Mawube commited on
Commit
a45f5c1
1 Parent(s): 216ee15

Disable audio generation

Browse files
Files changed (1) hide show
  1. 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
- 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]
 
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]