This commit is contained in:
yumoqing 2024-08-04 18:59:28 +08:00
parent b2d9b7f293
commit da0be21cc9

View File

@ -40,7 +40,8 @@ class WhisperFile(WhisperBase):
class WhisperBase64(WhisperBase):
def _stt(self, audio_base64):
raw = base64.decode(audio_base64)
raw = base64_decode(audio_base64)
ndarr = np.frombuffer(raw, dtype=np.float32)
info(f'ndarr={ndarr}')
return self.model.transcribe(ndarr)