Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -64,10 +64,6 @@ def convert_to_wav(audio_file):
|
|
64 |
audio.export(wav_file, format="wav")
|
65 |
return wav_file
|
66 |
|
67 |
-
|
68 |
-
# @spaces.GPU(duration=120, queue=False)
|
69 |
-
|
70 |
-
|
71 |
|
72 |
# Configure_is__not good enough
|
73 |
#if processor.tokenizer.pad_token_id is None:
|
@@ -77,6 +73,8 @@ def convert_to_wav(audio_file):
|
|
77 |
#assert processor.tokenizer.pad_token_id != processor.tokenizer.eos_token_id, \
|
78 |
#"pad_token_id and eos_token_id must be distinct..and they is not"
|
79 |
|
|
|
|
|
80 |
# transcription
|
81 |
def transcribe_audio(audio_file, batch_size=4):
|
82 |
start_time = time.time()
|
|
|
64 |
audio.export(wav_file, format="wav")
|
65 |
return wav_file
|
66 |
|
|
|
|
|
|
|
|
|
67 |
|
68 |
# Configure_is__not good enough
|
69 |
#if processor.tokenizer.pad_token_id is None:
|
|
|
73 |
#assert processor.tokenizer.pad_token_id != processor.tokenizer.eos_token_id, \
|
74 |
#"pad_token_id and eos_token_id must be distinct..and they is not"
|
75 |
|
76 |
+
|
77 |
+
@spaces.GPU()
|
78 |
# transcription
|
79 |
def transcribe_audio(audio_file, batch_size=4):
|
80 |
start_time = time.time()
|