Kevin676 commited on
Commit
124d1b3
1 Parent(s): d53e823

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -143,12 +143,7 @@ def greet(apikey, upload, audio, choice1):
143
  enhanced = enhance_model.enhance_batch(noisy, lengths=torch.tensor([1.]))
144
  torchaudio.save("enhanced.wav", enhanced.cpu(), 16000)
145
 
146
- voicefixer.restore(input="enhanced.wav", # input wav file path
147
- output="audio2.wav", # output wav file path
148
- cuda=True, # whether to use gpu acceleration
149
- mode = 2) # You can try out mode 0, 1, or 2 to find out the best result
150
-
151
- return [result.text, chat_response, "audio2.wav"]
152
 
153
  c1=gr.Interface(
154
  fn=greet,
@@ -163,7 +158,7 @@ c1=gr.Interface(
163
  ],
164
  #theme="huggingface",
165
  #title= "🥳💬💕 - TalktoAI,随时随地,谈天说地!"
166
- description = "🥳💬💕 - TalktoAI,随时随地,谈天说地! \n🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
167
  )
168
 
169
 
@@ -180,7 +175,7 @@ c2=gr.Interface(
180
  ],
181
  #theme="huggingface",
182
  #title= "🥳💬💕 - TalktoAI,随时随地,谈天说地!"
183
- description = "🥳💬💕 - TalktoAI,随时随地,谈天说地! \n🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
184
  )
185
 
186
  demo = gr.TabbedInterface([c1, c2], ["wav文件上传", "麦克风上传"])
 
143
  enhanced = enhance_model.enhance_batch(noisy, lengths=torch.tensor([1.]))
144
  torchaudio.save("enhanced.wav", enhanced.cpu(), 16000)
145
 
146
+ return [result.text, chat_response, "enhanced.wav"]
 
 
 
 
 
147
 
148
  c1=gr.Interface(
149
  fn=greet,
 
158
  ],
159
  #theme="huggingface",
160
  #title= "🥳💬💕 - TalktoAI,随时随地,谈天说地!"
161
+ description = "🥳💬💕 - TalktoAI,随时随地,谈天说地! \n\n🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
162
  )
163
 
164
 
 
175
  ],
176
  #theme="huggingface",
177
  #title= "🥳💬💕 - TalktoAI,随时随地,谈天说地!"
178
+ description = "🥳💬💕 - TalktoAI,随时随地,谈天说地! \n\n🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
179
  )
180
 
181
  demo = gr.TabbedInterface([c1, c2], ["wav文件上传", "麦克风上传"])