Spaces:
Running
Running
Disable audio generation
Browse files- utils/audio_generation.py +16 -16
utils/audio_generation.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import requests
|
2 |
import logging
|
3 |
-
from gradio_client import Client
|
4 |
|
5 |
|
6 |
class AudioGeneration:
|
@@ -68,21 +68,21 @@ class AudioGeneration:
|
|
68 |
|
69 |
return translated_text
|
70 |
|
71 |
-
def text_to_audio(self,text):
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
|
|
1 |
import requests
|
2 |
import logging
|
3 |
+
# from gradio_client import Client
|
4 |
|
5 |
|
6 |
class AudioGeneration:
|
|
|
68 |
|
69 |
return translated_text
|
70 |
|
71 |
+
# def text_to_audio(self,text):
|
72 |
+
# """
|
73 |
+
# Convert the translated text to audio
|
74 |
+
# :param text: translated text
|
75 |
+
# :return: audio file
|
76 |
+
# """
|
77 |
+
# logging.info("Converting text to audio")
|
78 |
|
79 |
+
# client = Client("https://softwarearoma-ghanalanguageaudiosynthesizer.hf.space/--replicas/0t7ah/")
|
80 |
+
# result = client.predict(
|
81 |
+
# self.selected_languages[self.language],
|
82 |
+
# text,
|
83 |
+
# api_name="/predict"
|
84 |
+
# )
|
85 |
|
86 |
+
# logging.debug(f"Audio file: {result[0]}")
|
87 |
|
88 |
+
# return result[0]
|