Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,9 @@ audio = mic_recorder(
|
|
20 |
# Check if audio is recorded
|
21 |
if audio:
|
22 |
st.audio(audio['bytes'], format='audio/wav')
|
23 |
-
byte_data=audio['bytes']
|
24 |
|
25 |
# Get raw audio data from the frame
|
26 |
-
audio_data =
|
27 |
|
28 |
# Convert audio to text
|
29 |
transcription = audio_to_text(audio_data)
|
|
|
20 |
# Check if audio is recorded
|
21 |
if audio:
|
22 |
st.audio(audio['bytes'], format='audio/wav')
|
|
|
23 |
|
24 |
# Get raw audio data from the frame
|
25 |
+
audio_data = np.frombuffer(audio['bytes'], dtype=np.int16)
|
26 |
|
27 |
# Convert audio to text
|
28 |
transcription = audio_to_text(audio_data)
|