Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,9 +30,10 @@ def check_password():
|
|
30 |
|
31 |
|
32 |
def save_temporary_audio_file(uploaded_file):
|
33 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav", mode='wb') as tmpfile: # Ensure mode is
|
34 |
-
#
|
35 |
-
|
|
|
36 |
return tmpfile.name
|
37 |
|
38 |
|
|
|
30 |
|
31 |
|
32 |
def save_temporary_audio_file(uploaded_file):
|
33 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav", mode='wb') as tmpfile: # Ensure mode is 'wb' for binary write
|
34 |
+
# Read content from the uploaded file and write it to the temporary file
|
35 |
+
file_content = uploaded_file.read() # Use .read() to get the file content
|
36 |
+
tmpfile.write(file_content)
|
37 |
return tmpfile.name
|
38 |
|
39 |
|