Spaces:
Runtime error
Runtime error
on1onmangoes
commited on
Commit
•
9cc58f7
1
Parent(s):
f7a7d96
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,8 @@ audio=st.file_uploader("Upload Your Audio File", type=['mp3','wav','m4a'])
|
|
17 |
|
18 |
if audio:
|
19 |
pipe = pipeline(model="facebook/wav2vec2-base-960h")
|
20 |
-
|
|
|
21 |
output = pipe("audio.wav", chunk_length_s=10, stride_length_s=(4, 2))
|
22 |
st.json(output)
|
23 |
# stride_length_s is a tuple of the left and right stride length.
|
|
|
17 |
|
18 |
if audio:
|
19 |
pipe = pipeline(model="facebook/wav2vec2-base-960h")
|
20 |
+
audio_segment= AudioSegment.from_file(audio)
|
21 |
+
audio_segment.export("audio.wav", format="wav")
|
22 |
output = pipe("audio.wav", chunk_length_s=10, stride_length_s=(4, 2))
|
23 |
st.json(output)
|
24 |
# stride_length_s is a tuple of the left and right stride length.
|