sanchit-gandhi HF staff commited on
Commit
4ce538c
1 Parent(s): 1f522d2

decode bytes for json serialisation

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -63,7 +63,7 @@ def transcribe_audio(microphone, file_upload, task, return_timestamps):
63
  inputs = f.read()
64
 
65
  inputs = ffmpeg_read(inputs, SAMPLING_RATE)
66
- inputs = {"array": base64.b64encode(inputs.tobytes()), "sampling_rate": SAMPLING_RATE}
67
 
68
  text, timestamps = inference(inputs=inputs, task=task, return_timestamps=return_timestamps)
69
 
 
63
  inputs = f.read()
64
 
65
  inputs = ffmpeg_read(inputs, SAMPLING_RATE)
66
+ inputs = {"array": base64.b64encode(inputs.tobytes()).decode(), "sampling_rate": SAMPLING_RATE}
67
 
68
  text, timestamps = inference(inputs=inputs, task=task, return_timestamps=return_timestamps)
69