Spaces:
Sleeping
Sleeping
Hugo Rodrigues
commited on
Commit
·
8e0e9c0
1
Parent(s):
40cf25d
change sample rate
Browse files
main.py
CHANGED
@@ -111,7 +111,7 @@ async def transcribe_audio(soundFile: UploadFile, tgt_lang='eng'):
|
|
111 |
audio_array_from_audio = model.generate(
|
112 |
**audio_inputs, tgt_lang=tgt_lang)[0].cpu().numpy().squeeze()
|
113 |
|
114 |
-
write(f"/tmp/output{start_time}.wav",
|
115 |
audio_array_from_audio)
|
116 |
|
117 |
print("Time took to process the request and return response is {} sec".format(
|
|
|
111 |
audio_array_from_audio = model.generate(
|
112 |
**audio_inputs, tgt_lang=tgt_lang)[0].cpu().numpy().squeeze()
|
113 |
|
114 |
+
write(f"/tmp/output{start_time}.wav", model.config.sampling_rate,
|
115 |
audio_array_from_audio)
|
116 |
|
117 |
print("Time took to process the request and return response is {} sec".format(
|