Yurii Paniv commited on
Commit
1040275
β€’
1 Parent(s): 5b211fc

Fix dtype handling

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +1 -1
  3. requirements.txt +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🐌
4
  colorFrom: blue
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 3.16.1
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: blue
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 3.41.2
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -85,7 +85,7 @@ def _convert_audio(audio_data: np.array, sample_rate: int):
85
  wav_file: AudioSegment = AudioSegment.from_raw(
86
  source_audio,
87
  channels=1,
88
- sample_width=4,
89
  frame_rate=sample_rate
90
  )
91
  wav_file.export(output_audio, "wav", codec="pcm_s16le", parameters=["-ar", "16k"])
 
85
  wav_file: AudioSegment = AudioSegment.from_raw(
86
  source_audio,
87
  channels=1,
88
+ sample_width=audio_data.dtype.itemsize,
89
  frame_rate=sample_rate
90
  )
91
  wav_file.export(output_audio, "wav", codec="pcm_s16le", parameters=["-ar", "16k"])
requirements.txt CHANGED
@@ -2,4 +2,4 @@ STT==1.4.0
2
  transformers==4.22.1
3
  pydub==0.25.1
4
  torch>=1.12
5
- gradio==3.16.1
 
2
  transformers==4.22.1
3
  pydub==0.25.1
4
  torch>=1.12
5
+ gradio==3.41.2