Update audio.py
Browse files
audio.py
CHANGED
@@ -41,18 +41,11 @@ def generate_voice(text):
|
|
41 |
save(audio,'data/audio.mp4')
|
42 |
save(audio,'audio.mp4')
|
43 |
commit_url = repo.push_to_hub()
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
# )
|
50 |
-
# api.upload_file(
|
51 |
-
# folder_path="./data",
|
52 |
-
# repo_id=DATASET_REPO_ID,
|
53 |
-
# repo_type="dataset",
|
54 |
-
# )
|
55 |
-
return (commit_url)
|
56 |
# return (44100, np.frombuffer(pad_buffer(audio), dtype=np.int16))
|
57 |
except UnauthenticatedRateLimitError as e:
|
58 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|
|
|
41 |
save(audio,'data/audio.mp4')
|
42 |
save(audio,'audio.mp4')
|
43 |
commit_url = repo.push_to_hub()
|
44 |
+
return_url = "failure"
|
45 |
+
if commit_url:
|
46 |
+
return_url = DATASET_REPO_URL+"/"+ DATA_FILENAME
|
47 |
+
|
48 |
+
return (return_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
# return (44100, np.frombuffer(pad_buffer(audio), dtype=np.int16))
|
50 |
except UnauthenticatedRateLimitError as e:
|
51 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|