Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -321,8 +321,13 @@ def generate_video():
|
|
| 321 |
user_voice = '/home/user/app/images/Recording.m4a'
|
| 322 |
|
| 323 |
with tempfile.NamedTemporaryFile(suffix=".wav", prefix="user_voice_",dir=TEMP_DIR.name, delete=False) as temp_file:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
user_voice_path = temp_file.name
|
| 325 |
-
user_voice.save(user_voice_path)
|
| 326 |
print('user_voice_path',user_voice_path)
|
| 327 |
|
| 328 |
set_api_key("92e149985ea2732b4359c74346c3daee")
|
|
|
|
| 321 |
user_voice = '/home/user/app/images/Recording.m4a'
|
| 322 |
|
| 323 |
with tempfile.NamedTemporaryFile(suffix=".wav", prefix="user_voice_",dir=TEMP_DIR.name, delete=False) as temp_file:
|
| 324 |
+
with open(user_voice_path, 'rb') as source_file:
|
| 325 |
+
file_contents = source_file.read()
|
| 326 |
+
temp_file.write(file_contents)
|
| 327 |
+
|
| 328 |
+
temp_file.flush()
|
| 329 |
user_voice_path = temp_file.name
|
| 330 |
+
# user_voice.save(user_voice_path)
|
| 331 |
print('user_voice_path',user_voice_path)
|
| 332 |
|
| 333 |
set_api_key("92e149985ea2732b4359c74346c3daee")
|