
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
음성파일의 확장자가 m4a로 되어 있는데 이 파일 확장자가 문제인지 궁금합니다.
작성코드
from transformers import pipeline
import gradio as gr
asr = pipeline("automatic-speech-recognition", "facebook/seamless-m4t-v2-large")
def speech_to_text(speech):
text = asr(speech)["text"]
return text
with gr.Blocks() as demo:
audio_file = gr.Audio(type="filepath")
text = gr.Textbox()
label = gr.Label()
button1 = gr.Button('Recognize Speech')
button1.click(speech_to_text, inputs=audio_file, outputs=text)
demo.launch(debug=True, share=True)

