Can I use AUX port in Raspberry Pi 3 (Model B) to plug a microphone to get audio signals in?

Matheesha Abeysekera
import speech_recognition as sr

r = sr.Recognizer()
with sr.Microphone() as source:
    audio = r.listen(source)

print(r.recognize_sphinx(audio))

When I run this code in Python in raspberry pi 3 (model B), it gives the following error.

OSError: No Default Input Device Available

what is the reason for this? do I need to have a USB microphone to get the audio signals in rather than using the microphone in earphones?

WoodyDev

< /Hey >

As designed by the Raspberry Pi's circuit layout, in short:

The 3.5mm Audio Jack on the Raspberry Pi models cannot be used as an audio input.

I'm not sure if you would want to anyways.

This means you have a couple of options on how you want to set up your microphone setup.

1. Using a small mic array (Like Alexa Echo or Google Home)

A lot of the time these kind of systems are prototyped on Raspberry Pi's or similar (see the official Alexa development kit). You can find similar replicas to the microphone arrays found on google home etc. , specifically fitted for the Raspberry Pi. These include some added advanced features such as Noise Suppression, Direction of Sound Source and other neat features I'll leave for you to explore yourself.

Here's 3 I found after googling (I'm sure if you look you can find more):

If you wanted high quality results for speech recognition I'd probably begin to look more down this route.

2. Using a normal USB microphone

Probably the most common approach is to get a standard USB microphone that has Raspberry Pi drivers and use this. I found one from Adafruit which I'm sure is just plug and play which could be nice and easy to get going with.

Again I'm sure you'll find plenty of other options online, these were just suggestions to get you started.


Hopefully this helps! :-)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can I use the USB port of the raspberry pi (model B+) for serial communication (RS232)

From Dev

How can i get JavaFX working on raspberry pi 3

From Dev

Can I use Ubuntu One on the Raspberry Pi?

From Dev

Kali Linux on a Raspberry pi 3 model b - WiFi problems

From Dev

Raspberry Pi 3 Model B Bluetooth and Uart (Rx/Tx)

From Dev

USB Audio adapter not recognized after a power cycle without plug/unplug on Raspberry Pi 3/Ubuntu

From Dev

Can I get audio data from microphone in background task?

From Dev

How can I check if my laptop's 3.5mm audio port works with a microphone?

From Dev

Install Ubuntu on Raspberry Pi 2 Model B

From Dev

Can I use .NET SIMD on Raspberry Pi 4?

From Dev

Can I use .NET SIMD on Raspberry Pi 4?

From Dev

Why can't I use python-mosquitto on the Raspberry Pi?

From Dev

Should I get a Raspberry Pi?

From Dev

An OS for Raspberry Pi 1 Model B (old Raspberry)

From Dev

Raspberry Pi 3 Model B setup startx or sudo startx gives: command not found

From Dev

crash while building with ffmpeg and contrib in raspberry pi 3 model B(debian)

From Dev

Can not boot raspberry pi 3b from USB Drive with UBoot + Grub

From Dev

I want my raspberry pi 3 b to automatically connect to a wireless network via antenna

From Dev

Raspberry Pi 2 model B - Mono C# PIN numbering

From Dev

How to wire Songle Relay Raspberry Pi 2 Model B

From Dev

Raspberry Pi is not recording from USB Microphone

From Dev

unable to record mono audio in raspberry pi3

From Dev

Can I run matlab on raspberry pi?

From Dev

Raspberry Pi What can I do with it?

From Dev

Can I run mythbackend on Raspberry Pi?

From Dev

How can I compile scanbd on Raspberry Pi?

From Dev

Can't access Jenkins running on a Raspberry Pi using port 8080

From Dev

I can not use the microphone on websites using chromium

From Dev

I can not use the microphone on websites using chromium

Related Related

  1. 1

    Can I use the USB port of the raspberry pi (model B+) for serial communication (RS232)

  2. 2

    How can i get JavaFX working on raspberry pi 3

  3. 3

    Can I use Ubuntu One on the Raspberry Pi?

  4. 4

    Kali Linux on a Raspberry pi 3 model b - WiFi problems

  5. 5

    Raspberry Pi 3 Model B Bluetooth and Uart (Rx/Tx)

  6. 6

    USB Audio adapter not recognized after a power cycle without plug/unplug on Raspberry Pi 3/Ubuntu

  7. 7

    Can I get audio data from microphone in background task?

  8. 8

    How can I check if my laptop's 3.5mm audio port works with a microphone?

  9. 9

    Install Ubuntu on Raspberry Pi 2 Model B

  10. 10

    Can I use .NET SIMD on Raspberry Pi 4?

  11. 11

    Can I use .NET SIMD on Raspberry Pi 4?

  12. 12

    Why can't I use python-mosquitto on the Raspberry Pi?

  13. 13

    Should I get a Raspberry Pi?

  14. 14

    An OS for Raspberry Pi 1 Model B (old Raspberry)

  15. 15

    Raspberry Pi 3 Model B setup startx or sudo startx gives: command not found

  16. 16

    crash while building with ffmpeg and contrib in raspberry pi 3 model B(debian)

  17. 17

    Can not boot raspberry pi 3b from USB Drive with UBoot + Grub

  18. 18

    I want my raspberry pi 3 b to automatically connect to a wireless network via antenna

  19. 19

    Raspberry Pi 2 model B - Mono C# PIN numbering

  20. 20

    How to wire Songle Relay Raspberry Pi 2 Model B

  21. 21

    Raspberry Pi is not recording from USB Microphone

  22. 22

    unable to record mono audio in raspberry pi3

  23. 23

    Can I run matlab on raspberry pi?

  24. 24

    Raspberry Pi What can I do with it?

  25. 25

    Can I run mythbackend on Raspberry Pi?

  26. 26

    How can I compile scanbd on Raspberry Pi?

  27. 27

    Can't access Jenkins running on a Raspberry Pi using port 8080

  28. 28

    I can not use the microphone on websites using chromium

  29. 29

    I can not use the microphone on websites using chromium

HotTag

Archive