diff --git a/app/whisper_model.py b/app/whisper_model.py index 4540d04..6c893c7 100644 --- a/app/whisper_model.py +++ b/app/whisper_model.py @@ -39,10 +39,15 @@ class WhisperFile(WhisperBase): stt = awaitify(_stt) class WhisperBase64(WhisperBase): - def _stt(self, audio_base64): + def _stt(self, audio): + audiolist = audio.values() + nparr = np.array(audiolist) + """ + raw = base64_decode(audio_base64) ndarr = np.frombuffer(raw, dtype=np.float32) - info(f'ndarr={ndarr}') - return self.model.transcribe(ndarr) + """ + info(f'ndarr={nparr}') + return self.model.transcribe(nparr) stt = awaitify(_stt)