nikita-sedletskiy commited on
Commit
e6d3cdb
1 Parent(s): c98b067

Rollback to original

Browse files
Files changed (1) hide show
  1. app.py +0 -6
app.py CHANGED
@@ -125,7 +125,6 @@ print("rmvpe model loaded.")
125
  def tts(
126
  model_name,
127
  speed,
128
- audioToProcess,
129
  tts_text,
130
  tts_voice,
131
  f0_up_key,
@@ -157,14 +156,11 @@ def tts(
157
  speed_str = f"+{speed}%"
158
  else:
159
  speed_str = f"{speed}%"
160
- """
161
  asyncio.run(
162
  edge_tts.Communicate(
163
  tts_text, "-".join(tts_voice.split("-")[:-1]), rate=speed_str
164
  ).save(edge_output_filename)
165
  )
166
- """
167
- edge_output_filename = audioToProcess
168
  t1 = time.time()
169
  edge_time = t1 - t0
170
  audio, sr = librosa.load(edge_output_filename, sr=16000, mono=True)
@@ -286,7 +282,6 @@ with app:
286
  interactive=True,
287
  )
288
  tts_text = gr.Textbox(label="Input Text", value="これは日本語テキストから音声への変換デモです。")
289
- audioToProcess = gr.File(label="Upload audio to process")
290
  with gr.Column():
291
  but0 = gr.Button("Convert", variant="primary")
292
  info_text = gr.Textbox(label="Output info")
@@ -298,7 +293,6 @@ with app:
298
  [
299
  model_name,
300
  speed,
301
- audioToProcess,
302
  tts_text,
303
  tts_voice,
304
  f0_key_up,
 
125
  def tts(
126
  model_name,
127
  speed,
 
128
  tts_text,
129
  tts_voice,
130
  f0_up_key,
 
156
  speed_str = f"+{speed}%"
157
  else:
158
  speed_str = f"{speed}%"
 
159
  asyncio.run(
160
  edge_tts.Communicate(
161
  tts_text, "-".join(tts_voice.split("-")[:-1]), rate=speed_str
162
  ).save(edge_output_filename)
163
  )
 
 
164
  t1 = time.time()
165
  edge_time = t1 - t0
166
  audio, sr = librosa.load(edge_output_filename, sr=16000, mono=True)
 
282
  interactive=True,
283
  )
284
  tts_text = gr.Textbox(label="Input Text", value="これは日本語テキストから音声への変換デモです。")
 
285
  with gr.Column():
286
  but0 = gr.Button("Convert", variant="primary")
287
  info_text = gr.Textbox(label="Output info")
 
293
  [
294
  model_name,
295
  speed,
 
296
  tts_text,
297
  tts_voice,
298
  f0_key_up,