ASG Models commited on
Commit
5fe24a7
1 Parent(s): 273cd6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -10
app.py CHANGED
@@ -9,19 +9,15 @@ def reverse_audio(audio):
9
  sr, data = audio
10
  return (sr, np.flipud(data))
11
 
 
 
12
 
13
- input_audio = gr.Audio(
14
- sources=["microphone"],
15
- waveform_options=gr.WaveformOptions(
16
- waveform_color="#01C6FF",
17
- waveform_progress_color="#0066B4",
18
- skip_length=2,
19
- show_controls=False,
20
- ),
21
- )
22
  demo = gr.Interface(
23
  fn=reverse_audio,
24
- inputs=input_audio,
25
  outputs="audio"
26
  )
27
 
 
9
  sr, data = audio
10
  return (sr, np.flipud(data))
11
 
12
+ # Use a pipeline as a high-level helper
13
+ from transformers import pipeline
14
 
15
+ pipe = pipeline("text-to-speech", model="asg2024/vits-ar-sa")
16
+ def inputText(text):
17
+ return text
 
 
 
 
 
 
18
  demo = gr.Interface(
19
  fn=reverse_audio,
20
+ inputs=pipe,
21
  outputs="audio"
22
  )
23