-
Notifications
You must be signed in to change notification settings - Fork 240
Description
Hey Guyz... some reason unable to get precise working on pi4 buster..
what I have tried:
Changing USB Posts
Pip reinstalling everything again (everything satisfies)
checking Alsa Sound Configuration
reinstalling portaudio
am using pyaudio with following config
audio = pyaudio.PyAudio()
self.audio_stream = audio.open(
format=pyaudio.paInt16,
channels=1,
rate=16000,
input=True,
frames_per_buffer=2048,
input_device_index=1 (my USB Sound Card)
)
while True:
self.stream.write(self.audio_stream.read(2048))
What Works
precise-listen <model_name> works perfectly fine
get the following error
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/homie-agent/scripts/mycroft-precise/runner/precise_runner/runner.py", line 240, in _handle_predictions
prob = self.engine.get_prediction(chunk)
File "/home/pi/homie-agent/scripts/mycroft-precise/runner/precise_runner/runner.py", line 64, in get_prediction
raise ValueError('Invalid chunk size: ' + str(len(chunk)))
ValueError: Invalid chunk size: 0