Spaces:
Runtime error
Runtime error
fix sound files parameters
Browse files- nemo_asr.py +1 -1
nemo_asr.py
CHANGED
@@ -24,7 +24,7 @@ def transcribe(file, modelName="stt_rw_conformer_transducer_large"):
|
|
24 |
# print(f"Audio in {fname} was recognized as: {transcription}")
|
25 |
# print(transcription[0])
|
26 |
x, sr = librosa.load(file.name)
|
27 |
-
sf.write("Test.wav", x,
|
28 |
transcription= asr_model.transcribe(["Test.wav"])
|
29 |
print(transcription)
|
30 |
return {"text": transcription, "filename": file.name}
|
|
|
24 |
# print(f"Audio in {fname} was recognized as: {transcription}")
|
25 |
# print(transcription[0])
|
26 |
x, sr = librosa.load(file.name)
|
27 |
+
sf.write("Test.wav", x, 16000)
|
28 |
transcription= asr_model.transcribe(["Test.wav"])
|
29 |
print(transcription)
|
30 |
return {"text": transcription, "filename": file.name}
|