File size: 740 Bytes
5557412
 
 
b2bce2c
feec576
5557412
b2bce2c
 
5557412
 
 
feec576
5557412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from transformers import pipeline
import gradio as gr
from pyctcdecode import BeamSearchDecoderCTC
from Aniemore import EmotionFromVoice
import os

# emo = pipeline("audio-classification", model="Aniemore/wav2vec2-xlsr-53-russian-emotion-recognition", trust_remote_code=True)
emo = EmotionFromVoice()


def transcribe(audio):
    return os.listdir("/tmp")

def get_asr_interface():
    return gr.Interface(
        fn=transcribe, 
        inputs=[
            gr.inputs.Audio(source="microphone", type="filepath")
        ],
        outputs=[
            "textbox",
        ])
        
interfaces = [
    get_asr_interface()
]

names = [
    "ASR"
]

gr.TabbedInterface(interfaces, names).launch(server_name = "0.0.0.0", enable_queue=False)