Fix linter errors

This commit is contained in:
Alexandre Lissy 2019-09-18 15:52:12 +02:00
parent b5a3e328da
commit 5465747e37
2 changed files with 9 additions and 7 deletions

View File

@ -22,6 +22,7 @@ class Audio(object):
def __init__(self, callback=None, device=None, input_rate=RATE_PROCESS, file=None): def __init__(self, callback=None, device=None, input_rate=RATE_PROCESS, file=None):
def proxy_callback(in_data, frame_count, time_info, status): def proxy_callback(in_data, frame_count, time_info, status):
#pylint: disable=unused-argument
if self.chunk is not None: if self.chunk is not None:
in_data = self.wf.readframes(self.chunk) in_data = self.wf.readframes(self.chunk)
callback(in_data) callback(in_data)
@ -178,7 +179,8 @@ def main(ARGS):
# Stream from microphone to DeepSpeech using VAD # Stream from microphone to DeepSpeech using VAD
spinner = None spinner = None
if not ARGS.nospinner: spinner = Halo(spinner='line') if not ARGS.nospinner:
spinner = Halo(spinner='line')
stream_context = model.createStream() stream_context = model.createStream()
wav_data = bytearray() wav_data = bytearray()
for frame in frames: for frame in frames: