khalidd7
Posts: 3
Joined: Thu Feb 07, 2019 2:12 pm

How to read a sound ?

Thu Feb 07, 2019 2:27 pm

Hi, I'm working on a project, I need to read an analog signal from a microphone.
and to build an application on my phone to receive that signal.
and i have no experience with the raspberry pi 3
so my Questions is
1- is it possible to build an application ( using REACT Native ) on my phone to control the voice coming to the raspberry pi 3 by wi-fi and send data to the pi?

2- Where can I find the source code that makes me read the analog signal and convert it to digital?

User avatar
rpdom
Posts: 19283
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to read a sound ?

Thu Feb 07, 2019 3:13 pm

The Pi does not have any analogue inputs. You would need something like a USB sound card to receive audio from a microphone.
Unreadable squiggle

khalidd7
Posts: 3
Joined: Thu Feb 07, 2019 2:12 pm

Re: How to read a sound ?

Thu Feb 07, 2019 4:39 pm

rpdom wrote:
Thu Feb 07, 2019 3:13 pm
The Pi does not have any analogue inputs. You would need something like a USB sound card to receive audio from a microphone.
can you provide to me a link that provides me like it?

I need the guideline to start.

User avatar
Gavinmc42
Posts: 6309
Joined: Wed Aug 28, 2013 3:31 am

Re: How to read a sound ?

Fri Feb 08, 2019 1:11 am

Also Digital microphones, i2s or PDM.
There are analog Hats with codecs and or Microphones.

AIY voice kit project Pi Mag 57

Bluetooth might be easier if you use your phone.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to read a sound ?

Fri Feb 08, 2019 1:34 am

khalidd7 wrote:
Thu Feb 07, 2019 2:27 pm
I need to read an analog signal from a microphone.


USB Sound Card for Rpi

The following might help.

Ugreen USB 2.0 Multimode External Sound Card US$12
https://www.aliexpress.com/store/produc ... 3f51ALwPZZ

RE: DETECT CURRENT ON RASPBERRY PI Postby tlfong01 » 2018-Nov-25 Sun 8:28 pm
https://www.raspberrypi.org/forums/view ... 5#p1396404

RE: DETECT CURRENT ON RASPBERRY PI Postby tlfong01 » 2018-Oct-22 Mon 9:34 pm
https://www.raspberrypi.org/forums/view ... 6#p1383138
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to read a sound ?

Fri Feb 08, 2019 4:12 am

khalidd7 wrote:
Thu Feb 07, 2019 2:27 pm
I need to read an analog signal from a microphone.
and to build an application on my phone to receive that signal.

MAX9812 Microphone Amplifier

I am not sure if you wish to get only the analog signal and the microphone is not relevant. You might let us know more about your project requirements.

A couple of weeks ago I was playing with a buzzer. The buzzer has a hand and when the hand claps a drum to make the buzzing. I I want to look at the analog signal which drives the hand, and I know the frequency of the clapping hand is in the audio range, so I used a cheapy, 2 yuan, Max9818 audio amplifier module to extract the signal (actually I removed the microphone of the amplifier module and feed the input direct to the buzzer hand. I connect a loudspeaker to the output of the amplifier and analyse the amplified analog signal.

I am doing a similar project right now. I am playing with ECG. I extract the ECG signal using a AD8232 ECG amplifier module which amplifies the weak human (me!) heart signal and I use a scope to look at the amplified heart signal.

Next step is to use a analog to digital converter (MCP3008/3208, AD1510, HX711 etc) to get the digital signal and fee it to a wifi moule ESP8286-32 which tells the Rpi to do the analysis.

Rpi then feeds the signal to the deep sleeping AlphaGo. AlphaGo wakes up and calls all 2,000 friends on the cloud to do a deep learning and learn that my heart has a hole and needs repairing.

So Rpi wakes up the deep sleeping ESP8226 which MQTTs my android phone's alarm buzzer to wakes me up. I woke up and realized that it was just a bad day dream, and my heart is healthy and I could not whatsapp my boss that my heart has a hole and the doctor tells me I must take a long sick leave, ... :mrgreen:

Just dream talking, need to start work now, I also need to send the above rubbish as my 300 word English writing assignment to my teacher. Sorry for the typos, Kung Hei Fat Choi and see you later, ...


Max9812 Microphone Amplifier
https://fr.aliexpress.com/item/Livraiso ... fa6ec4d-22

Max9812 microphone amplifier extracting analog signal
https://www.raspberrypi.org/forums/view ... 0#p1403624

Using HX711 to convert ECG analog signals
https://www.raspberrypi.org/forums/view ... 5#p1426903
I am an electronics and smart home hobbyist.

Return to “General discussion”