Commit
·
1bce638
1
Parent(s):
d582d2f
add whisper to backend
Browse filesI should do the testing on colab, but testing is easy here because of microphone option i believe
- backend/audio_to_tgt.py +5 -1
backend/audio_to_tgt.py
CHANGED
@@ -1,2 +1,6 @@
|
|
1 |
def src_audio_to_eng_translator(audio_file_input):
|
2 |
-
|
|
|
|
|
|
|
|
|
|
1 |
def src_audio_to_eng_translator(audio_file_input):
|
2 |
+
transcription = client.audio.translations.create(
|
3 |
+
model="whisper-1",
|
4 |
+
file=audio_file_input,
|
5 |
+
)
|
6 |
+
return transcription.text
|