You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with open("transcription.txt", "w", encoding="utf-8") as f:
f.write(result['text'])
The text was updated successfully, but these errors were encountered:
abhijeet12s
changed the title
如何使用FunASR的Emotion2Vec+ Large模型转录音频
如何使用FunASR的Emotion2Vec+ Large模型转录音频 , you can see the code that works but transcribes audio in text i want it in srt
Dec 1, 2024
如何使用FunASR的Emotion2Vec+ Large模型转录音频
操作系统
code that works :
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
Initialize the ASR pipeline
asr_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='iic/emotion2vec_plus_large'
)
Path to your audio file
audio_file = r"C:\Users\abhij\Downloads\3mau (enhanced).wav"
Transcribe the audio
result = asr_pipeline(audio_file)
Print the transcription result
print("Transcription:", result['text'])
Optional: Save to file
with open("transcription.txt", "w", encoding="utf-8") as f:
f.write(result['text'])
The text was updated successfully, but these errors were encountered: