vakodiya commited on
Commit
6be62b1
1 Parent(s): 4698483

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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 = byte_data.to_ndarray().astype(np.int16)
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)