Using microphone with raspberry pi - raspberry-pi

I am very new to raspberry pi. I want to use annyang speech recognition software (it is a speech recognition software for websites). But I am not understanding how to start working with microphone. (When I use arecord or aplay commands, it is showing error such as: No such file in directory).
Do I need to change any settings in the pi board to access microphone?

Raspberry pi's do not have a built in microphone, you will need to use a USB microphone or connect a USB Sound Card and plug a microphone into that.
When you use arecord you will probably have to tell it to use the right device with a command similar to this:
arecord /home/pi/Desktop/a.wav -D sysdefault:CARD=1

Related

Stream video from Raspberry Pi 4 while another program uses the pi camera as well

I have a raspberry pi 4 with a camera module on it and a pan-tilt hat.
I've made a project which when started, it uses the feed from the RPI camera, detects a face and center around it. If the person moves, the camera tracks him.
When I run the .py file through the terminal, it works.
Now I want to use it with my PC. Therefore, I need to simultaneously run my project in the background AND to steam the feed to my PC somehow.
From the methods I searched online, I saw that it's possible to use flask and get a URL to use as an IP camera.
My question is, is it possible to stream the camera feed while my projects runs and tracks the face?
Thank you.

How to route / pipe output of Watson text to speech to local speaker vs terminal

I'm using the Watson service speech to text and text to speech. So far, I've been able to get everything working excepting getting the sound to output to the speakers on a Raspberry PI running Node JS.
I'm connecting to the text to speech service. It seems that I am getting a response back from the Watson service, but it is displaying on the Pi terminal versus going to the USB speaker. At the end of the text display, it shows that it is being sent to the hw device 0:0 which is wrong. It should go to 1:0
When I test the Raspberry Pi sound without Watson, the audio works fine without the Watson Service, using aplay which plays back on a different hw device (1:0).
So my question is this: Is there a parameter using the https: interface that enables you to control to which hw sound device to route the speech to or does that all have to be controlled locally, somewhere within my JS code.
It turns out that the hw device setting of device 0:0 was coded within the js code (which I did not write). Changing this parameter routed the sound to the correct sound card which was a usb device running on 1:0.
Mystery solved!

Alexa Raspberry Pi

I have a Raspberry PI model B+ and I was thinking of integrating it to Alexa Voice Service. So I was able to manage my Raspberry PI and Alexa Voice Service until the part that Alexa says hello. In order to achieve this I used also PC108 media USB external sound card. So I’m getting both input and output from my plug-in microphone or my mini jack audio output to speaker. The thing is that something is missing in order to work .What do I have to do in order to make Alexa listen ?
Thank you in advance.
At re:Invent 2016 they had a workshop on doing this. Take a look at the slides from the session and the workshop instructions. We used a simple USB microphone and sound is built into the Pi. The sample app is still being updated so it should be good to go.
This was with a Pi3 but the basics should still be the same.
You can also use PiCroft that is an image of Mycroft a open source assistant it's just burn it on a sdcard and use
https://mycroft.ai/mycroft-now-available-raspberry-pi-image/
if you want to create skills https://docs.mycroft.ai/skill.creation

Take pictures/video with my goPro from the command line

I'm looking for a way to capture pictures or video from my entry-level GoPro using the command line and with the camera connected via USB. There're lots tutorials of how to do it with the goPros that have Wi-Fi. Is there any way to do it like we do with webcams?
None of the GoPros support live streaming via USB. USB is primarily used for charging camera and access SD card. You simply cannot live stream from entry-level GoPro.

How do I make the sound from raspberry pi go to iPod Touch

I am making a raspberry pi robot and I wanted to know if there was a way to connect an IPod Touch(1st gen) to the rpi via USB port,then use the IPod as a speaker for my rpi?