freddyaboulton HF staff commited on
Commit
6cba8bb
1 Parent(s): 2bc6026
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -104,7 +104,7 @@ def speaking(audio: np.ndarray, sampling_rate: int):
104
  audio_buffer = io.BytesIO()
105
 
106
  audio = AudioSegment(
107
- data.tobytes(),
108
  frame_rate=sampling_rate,
109
  sample_width=data.dtype.itemsize,
110
  channels=(1 if len(data.shape) == 1 else data.shape[1]),
@@ -180,7 +180,7 @@ with gr.Blocks() as demo:
180
  with gr.Row():
181
  with gr.Column():
182
  input_audio = gr.Audio(
183
- label="Input Audio", sources="microphone", type="filepath"
184
  )
185
  with gr.Column():
186
  output_audio = gr.Audio(label="Output Audio", streaming=True, autoplay=True)
 
104
  audio_buffer = io.BytesIO()
105
 
106
  audio = AudioSegment(
107
+ audio.tobytes(),
108
  frame_rate=sampling_rate,
109
  sample_width=data.dtype.itemsize,
110
  channels=(1 if len(data.shape) == 1 else data.shape[1]),
 
180
  with gr.Row():
181
  with gr.Column():
182
  input_audio = gr.Audio(
183
+ label="Input Audio", sources="microphone", type="numpy"
184
  )
185
  with gr.Column():
186
  output_audio = gr.Audio(label="Output Audio", streaming=True, autoplay=True)