Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ def transcribe_audio(openai_key, file_path, model):
|
|
180 |
return None
|
181 |
|
182 |
def save_and_play_audio(audio_recorder):
|
183 |
-
audio_bytes = audio_recorder()
|
184 |
if audio_bytes:
|
185 |
filename = generate_filename("Recording", "wav")
|
186 |
with open(filename, 'wb') as f:
|
@@ -412,7 +412,7 @@ def whisper_generate_filename(prompt, file_type):
|
|
412 |
return f"{safe_date_time}_{safe_prompt}.{file_type}"
|
413 |
|
414 |
def whisper_save_and_play_audio(audio_recorder):
|
415 |
-
audio_bytes = audio_recorder()
|
416 |
if audio_bytes:
|
417 |
filename = whisper_generate_filename("Recording", "wav")
|
418 |
with open(filename, 'wb') as f:
|
|
|
180 |
return None
|
181 |
|
182 |
def save_and_play_audio(audio_recorder):
|
183 |
+
audio_bytes = audio_recorder(key='audio_recorder')
|
184 |
if audio_bytes:
|
185 |
filename = generate_filename("Recording", "wav")
|
186 |
with open(filename, 'wb') as f:
|
|
|
412 |
return f"{safe_date_time}_{safe_prompt}.{file_type}"
|
413 |
|
414 |
def whisper_save_and_play_audio(audio_recorder):
|
415 |
+
audio_bytes = audio_recorder(key='whisper_audio_recorder')
|
416 |
if audio_bytes:
|
417 |
filename = whisper_generate_filename("Recording", "wav")
|
418 |
with open(filename, 'wb') as f:
|