Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TJ is now listening and immediately comes back to command line #38

Closed
kcookboyd opened this issue May 2, 2017 · 15 comments
Closed

TJ is now listening and immediately comes back to command line #38

kcookboyd opened this issue May 2, 2017 · 15 comments

Comments

@kcookboyd
Copy link

I had the speech_to_text working back in March
Now, when I execute stt.js I get TJ is now listening and command line comes back immediately.
Any ideas?
Thanks for your help

@victordibia
Copy link
Contributor

victordibia commented May 2, 2017 via email

@kcookboyd
Copy link
Author

i had some corruption and my rasp config was missing, so I installed it and removed tjbot, re-install and now getting this error when I execute sudo node stt.js
verbose: TJBot initializing LED
[rpi-ws281x-native] Could not verify raspberry-pi version. If this is wrong and you are running this on a raspberry-pi, please file a bug-report at https://github.com/beyondscreen/node-rpi-ws281x-native/issues
A non-functional stub of this modules interface will be returned.
verbose: TJBot initializing microphone
verbose: TJBot initializing speech_to_text service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.2.1
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
verbose: TJBot initializing microphone
pi@raspberrypi:~/Desktop/tjbot/recipes/speech_to_text $

Much appreciate your help

@victordibia
Copy link
Contributor

What version of the raspberry Pi are you using? Pi2 or Pi3?
The error message suggests there was a problem initializing the LED ...
Does the app "end" like previously or you are able to see speech transcripts when you speak to it?

-V.

@kcookboyd
Copy link
Author

Pi3

@kcookboyd
Copy link
Author

pi@raspberrypi:/Desktop/tjbot/recipes/speech_to_text $ sudo node stt.jsverbose: TJBot initializing LED
[rpi-ws281x-native] Could not verify raspberry-pi version. If this is wrong and you are running this on a raspberry-pi, please file a bug-report at https://github.com/beyondscreen/node-rpi-ws281x-native/issues
A non-functional stub of this modules interface will be returned.
verbose: TJBot initializing microphone
verbose: TJBot initializing speech_to_text service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.2.1
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
verbose: TJBot initializing microphone
pi@raspberrypi:
/Desktop/tjbot/recipes/speech_to_text $

1 similar comment
@kcookboyd
Copy link
Author

pi@raspberrypi:/Desktop/tjbot/recipes/speech_to_text $ sudo node stt.jsverbose: TJBot initializing LED
[rpi-ws281x-native] Could not verify raspberry-pi version. If this is wrong and you are running this on a raspberry-pi, please file a bug-report at https://github.com/beyondscreen/node-rpi-ws281x-native/issues
A non-functional stub of this modules interface will be returned.
verbose: TJBot initializing microphone
verbose: TJBot initializing speech_to_text service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.2.1
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
verbose: TJBot initializing microphone
pi@raspberrypi:
/Desktop/tjbot/recipes/speech_to_text $

@kcookboyd
Copy link
Author

i'm not sure why the copy and paste is putting a strikethrough sorry about that

@victordibia
Copy link
Contributor

Can you paste the results of the following?
aplay -l
lsusb

@kcookboyd
Copy link
Author

aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:4717:(snd_config_expand) Load defaults error: File exists
ALSA lib control.c:953:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:277: control open (0): File exists
ALSA lib conf.c:4717:(snd_config_expand) Load defaults error: File exists
ALSA lib control.c:953:(snd_ctl_open_noupdate) Invalid CTL hw:1
aplay: device_list:277: control open (1): File exists

us 001 Device 006: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 005: ID 1c4f:0026 SiGma Micro Keyboard
Bus 001 Device 004: ID 04f3:0235 Elan Microelectronics Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

@victordibia
Copy link
Contributor

victordibia commented May 3, 2017

Lets run some test to ensure you are able to record audio using your microphone (btw .. what type of mic are you using?)
arecord -D plughw:0,0 test.wav
This should record audio to test.wav and you should be able to play it aplay test.wav.
Does this run correctly on your setup?

@kcookboyd
Copy link
Author

Mini Micohone USB microphone model MI-305
Received an error: pi@raspberrypi:~ $ arecord -D plughw:0,0 test.wav
ALSA lib conf.c:4717:(snd_config_expand) Load defaults error: File exists
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM plughw:0,0
arecord: main:722: audio open error: File exists

@tanmayb123
Copy link

Hi @victordibia and @kcookboyd. I'm being hit by this error as well. I sent you a slack message Victor, if possible, please help me out, as I've got an event in a few days, and I need the code ready :) Thanks!

@tanmayb123
Copy link

I've been able to fix the problem! I changed the microphoneDeviceId from plughw:1,0 to default.
Is this an issue only I'm experiencing, or is this something I should submit a pull request for? Since @kcookboyd and I have faced this issue, I think this is something that should be mentioned in the readme at least.

@victordibia
Copy link
Contributor

victordibia commented May 28, 2017

HI @tanmayb123
On various Pi setups, the microphone/speaker id might be different hence the need to change the deviceID variable. On most Pi's its plughw:1,0.
You are right, we should get an issue like this better documented.

Glad you were able to resolve this, thanks for the feedback!
Best with your event!

Victor.

@jweisz jweisz closed this as completed Jun 27, 2017
@daleron01
Copy link

Hey Guys. I have the same problem with the same USB Microphone. I am a complete noob, so how do I change the plughw to default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants