File size: 390 Bytes
0eddaee
56e6969
 
 
 
0eddaee
 
 
 
 
 
 
56e6969
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import numpy as np
import gradio as gr

def voice_classification(audio):

    # generate a random number between 0 and 1
    # if 1 for engaging, 0 for boring
    random_number = np.random.rand()
    if random_number > 0.5:
        result = "boring"
    else:
        result = "engaging"
    
    return result

gr.Interface(fn=voice_classification, inputs="audio", outputs="text").launch()