Katock commited on
Commit
283f48f
·
1 Parent(s): 53a560c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -19,17 +19,17 @@ logging.getLogger('matplotlib').setLevel(logging.WARNING)
19
  limitation = os.getenv("SYSTEM") == "spaces" # limit audio length in huggingface spaces
20
 
21
 
22
- # audio_postprocess_ori = gr.Audio.postprocess
23
 
24
 
25
- # def audio_postprocess(self, y):
26
- # data = audio_postprocess_ori(self, y)
27
- # if data is None:
28
- # return None
29
- # return gr_processing_utils.encode_url_or_file_to_base64(data["name"])
30
- #
31
- #
32
- # gr.Audio.postprocess = audio_postprocess
33
 
34
 
35
  def create_vc_fn(model, spk):
 
19
  limitation = os.getenv("SYSTEM") == "spaces" # limit audio length in huggingface spaces
20
 
21
 
22
+ audio_postprocess_ori = gr.Audio.postprocess
23
 
24
 
25
+ def audio_postprocess(self, y):
26
+ data = audio_postprocess_ori(self, y)
27
+ if data is None:
28
+ return None
29
+ return gr_processing_utils.encode_url_or_file_to_base64(data["name"])
30
+
31
+
32
+ gr.Audio.postprocess = audio_postprocess
33
 
34
 
35
  def create_vc_fn(model, spk):