From 608f9c264c7314ce44e94e339d7e92fcff584d35 Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Fri, 14 Jan 2022 17:05:27 +0400 Subject: [PATCH] Fix speech class --- speech.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speech.py b/speech.py index 47967ab..418ce0a 100644 --- a/speech.py +++ b/speech.py @@ -25,7 +25,7 @@ class Speech: return result @staticmethod - def __stt(wav_file: str, server: str) -> str: + def __stt(wav_file, server): print(f'Connecting to \'{server}\'...') request = Request(url=f'{server}/stt', data=Speech.__load_wav(wav_file), @@ -36,5 +36,5 @@ class Speech: raise RuntimeError(f'Wrong reply from server: {result}') return result['text'] if not result['code'] else f'Server error: {result}' - def run(self, wav_file, server): + def run(self, wav_file: str, server: str) -> str: return self.__stt(wav_file, server)