def report(reportid):
    current_id = reportid
    print('Showing Report '+str(reportid))
    files = [x for x in os.listdir() if (str(reportid) in x and "wav" in x)]
    print(files)
    for path in files:
        data = getAttribs(path)
        pitch = data[0]
        jitter = data[1]
        shimmer = data[2]

        gender, age = gender_age(path)
        current_emotion, emotion_scores = emotion(path)
        ts = 0
        for a in emotion_scores.keys():
            ts += emotion_scores[a]
        for a in emotion_scores.keys():
            emotion_scores[a] = abs(emotion_scores[a]+np.random.randn()*6 - 3)/ts * 100
        total_values = mysp.mysptotal(path.replace(".wav",""),os.getcwd())
        total_values = total_values.to_dict()
        for k in total_values.keys():
            total_values[k] = float("{0:.3f}".format(float(total_values[k][0])))
        if(str(current_id)+'_alexarecord.txt' in os.listdir()):
            f = open(str(current_id)+'_alexarecord.txt', 'r')
            total_values['selfdiag'] = f.readlines()[0]
            f.close()

        total_values['gender'] = gender[0]
        total_values['age'] = age[0]
        total_values['current_emotion'] = current_emotion
        total_values['emotion_scores'] = emotion_scores
        total_values['pitch'] = pitch
        total_values['jitter'] = jitter
        total_values['shimmer'] = shimmer
        total_values['parkinson'] = nn.percentChance(path)*100*0.4
        return render_template('pages/blank-page.html', values=total_values)
Exemple #2
0
mysp.myspsyl(p, c)

# Gender recognition and mood of speech
mysp.myspgend(p, c)

#pronunciation posteriori probablility score percentage
mysp.mysppron(p, c)

# detect and count number of syllables

# detect and count number of fillers and pauses
mysp.mysppaus(p, c)

# measure the rate of speech

# measure the articulation (speed). Output is syllables/sec speaking duration
mysp.myspatc(p, c)

# measure speaking time (excl. fillers and pauses)
mysp.myspst(p, c)

# measure total speaking duration (inc. fillers and pauses)
mysp.myspod(p, c)

# measure ratio between speaking duration and total speaking duration

mysp.myspf0q75(p, c)

mysp.mysptotal(p, c)
Exemple #3
0
def analysis(p):
    print(mysp.mysptotal(p, os.getcwd()))
    print(mysp.myspgend(p, os.getcwd()))
    print(mysp.mysppron(p, os.getcwd()))