bugfix
This commit is contained in:
parent
5776c05bda
commit
83388ba0cc
@ -39,10 +39,15 @@ class WhisperFile(WhisperBase):
|
|||||||
stt = awaitify(_stt)
|
stt = awaitify(_stt)
|
||||||
|
|
||||||
class WhisperBase64(WhisperBase):
|
class WhisperBase64(WhisperBase):
|
||||||
def _stt(self, audio_base64):
|
def _stt(self, audio):
|
||||||
|
audiolist = audio.values()
|
||||||
|
nparr = np.array(audiolist)
|
||||||
|
"""
|
||||||
|
|
||||||
raw = base64_decode(audio_base64)
|
raw = base64_decode(audio_base64)
|
||||||
ndarr = np.frombuffer(raw, dtype=np.float32)
|
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)
|
stt = awaitify(_stt)
|
||||||
|
Loading…
Reference in New Issue
Block a user