Giter VIP home page Giter VIP logo

deepspeech_raspberrypi4_hotword's People

Contributors

aiwintermuteai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepspeech_raspberrypi4_hotword's Issues

MODEL_FILE_PATH is not defined

Hi, I am testing your articles on raspberry pi 4 with 8GB ram.

I followed the instruction but I get the following error.

# python3 mic_streaming.py --keywords blueberry
Traceback (most recent call last):
  File "mic_streaming.py", line 270, in <module>
    main()
  File "mic_streaming.py", line 224, in main
    parser.add_argument('--model_file_path', help='absolute path to model parameter file', default=MODEL_FILE_PATH)
NameError: name 'MODEL_FILE_PATH' is not defined

I tried to fix but I got other errors. Can you help?

alsa errors

After modifying porcupine_demo.py to work with deepspeech 0.7.0, I'm greeted with this alsa error. I've tried modifying resources/util/python/util.py as you suggested but to no avail. Your instructions describe replacing "rev 5" with "rev 3", even through "rev 5" refers to "cortex-a7", not "cortex-a53". "rev 4" refers to "cortex-a53" (maybe the file has been updated?). I'm using the seed studio 4 mic array hat: http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/, but it worked for the mic_vad_streaming.py, so i don't think that's the issue.

My error message is:

`Initializing model...
TensorFlow: v1.15.0-24-gceb46aa
DeepSpeech: v0.7.0-0-g3fbbca2
listening for:
porcupine (sensitivity: 0.500000)
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
`

ModuleNotFoundError sound file and NameError

hey there
I cloned your repository and tried to get it to work but receive errors

Run: python3 mic_streaming.py --keywords blueberry

Traceback (most recent call last):
  File "mic_streaming.py", line 30, in <module>
    import soundfile
ModuleNotFoundError: No module named 'soundfile'

I installed it with pip3 install soundfile. But I receive the following error then

Run: python3 mic_streaming.py --keywords blueberry

Traceback (most recent call last):
  File "mic_streaming.py", line 270, in <module>
    main()
  File "mic_streaming.py", line 224, in main
    parser.add_argument('--model_file_path', help='absolute path to model parameter file', default=MODEL_FILE_PATH)
NameError: name 'MODEL_FILE_PATH' is not defined

EDIT: oh and had to sudo apt-get install libatlas-base-dev to resolve the following error

Traceback (most recent call last):
  File "mic_streaming.py", line 27, in <module>
    from audio_tools import VADAudio
  File "/home/pi/deepspeech/DeepSpeech_RaspberryPi4_Hotword/audio_tools.py", line 10, in <module>
    from scipy import signal
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/signal/__init__.py", line 289, in <module>
    from . import sigtools, windows
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/signal/windows/__init__.py", line 41, in <module>
    from .windows import *
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/signal/windows/windows.py", line 7, in <module>
    from scipy import linalg, special, fft as sp_fft
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/linalg/__init__.py", line 194, in <module>
    from .misc import *
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/linalg/misc.py", line 3, in <module>
    from .blas import get_blas_funcs
  File "/home/pi/.local/lib/python3.7/site-packages/scipy/linalg/blas.py", line 213, in <module>
    from scipy.linalg import _fblas
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

Index error List out of range...

Running on a jetson nano jetpack 4.4

python3.7 mic_streaming.py --keywords blueberry
Traceback (most recent call last):
File "mic_streaming.py", line 35, in
import pvporcupine
File "/home/vondalej/.local/lib/python3.7/site-packages/pvporcupine/init.py", line 2, in
from .resources.util.python import *
File "/home/vondalej/.local/lib/python3.7/site-packages/pvporcupine/resources/util/python/init.py", line 1, in
from .util import KEYWORDS
File "/home/vondalej/.local/lib/python3.7/site-packages/pvporcupine/resources/util/python/util.py", line 43, in
_PV_SYSTEM, _PV_MACHINE = _pv_platform()
File "/home/vondalej/.local/lib/python3.7/site-packages/pvporcupine/resources/util/python/util.py", line 36, in _pv_platform
pv_machine = _pv_linux_machine(platform.machine())
File "/home/vondalej/.local/lib/python3.7/site-packages/pvporcupine/resources/util/python/util.py", line 12, in _pv_linux_machine
hardware_info = [x for x in cpu_info.split('\n') if 'Hardware' in x][0]
IndexError: list index out of range

change mic device to use without respeaker ?

thans for this well coded script and your youtube video.but can you explain / write another script about how we can run it without respeaker board on raspberry pi.
i suppose i need to change mic device to use it right ?

ERROR: deepspeech 0.9.1 has requirement numpy>=1.17.3, but you'll have numpy 1.16.6 which is incompatible.

Hi, I've cloned the project, run install.sh and I'm getting the following error:
ERROR: deepspeech 0.9.1 has requirement numpy>=1.17.3, but you'll have numpy 1.16.6 which is incompatible.
Then running it it does not work:

python3 mic_streaming.py --keywords blueberry
Initializing model...
INFO:root:Model: DeepSpeech_RaspberryPi4_Hotword/deepspeech-0.9.1-models.tflite
TensorFlow: v2.3.0-6-g23ad988
DeepSpeech: v0.9.1-0-gab8bd3e
Warning: reading entire model file into memory. Transform model file into an mmapped graph to reduce heap usage.
2021-10-17 11:09:46.103991: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Data loss: Can't parse DeepSpeech_RaspberryPi4_Hotword/deepspeech-0.9.1-models.tflite as binary proto
Traceback (most recent call last):
  File "mic_streaming.py", line 272, in <module>
    main()
  File "mic_streaming.py", line 262, in main
    PorcupineDemo(
  File "mic_streaming.py", line 87, in __init__
    self.model = deepspeech.Model(model_name)
  File "/home/[]/.local/lib/python3.8/site-packages/deepspeech/__init__.py", line 38, in __init__
    raise RuntimeError("CreateModel failed with '{}' (0x{:X})".format(deepspeech.impl.ErrorCodeToErrorMessage(status),status))
RuntimeError: CreateModel failed with 'Error reading the proto buffer model file.' (0x3005)

DeepSpeech

Hii,
Could ı ask some questions about Mozilla DeepSpeech? Firslty my english is not so good please forgive me :)
1-)I implemented all codes and they work well.On the other hand,when speech to text,it can not translate my all sentence,it just understand some words.How can ı solve this problem?
2-)I want to work on Turkish language,I search it how can ı do that? but ı did not understand actually :(
3-)I want to change hotword,how can ı change?

If you help me,I will be so happy :) Thank you sir

Best regards

Illegal Instruction

Thanks for your work on this to make it easier to implement these tools. I am getting an error and not sure where to even start.

There is not a lot of information present with this error:

pi@pivoice:~/speech $ sudo python3 mic_streaming.py --keywords blueberry
Initializing model...
INFO:root:Model: /home/pi/speech/deepspeech-0.9.1-models.tflite
TensorFlow: v2.3.0-6-g23ad988
DeepSpeech: v0.9.3-0-gf2e9c85
Illegal instruction

Any guideance?

Just FYI, I had to run this command as well following your script:
sudo apt-get install libsndfile1

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.