Skip to content

Python speech recognition for pulseaudio

Python libraries speech_recognition and PyAudio do not support pulseaudio. Does anyone know any that do? I'm trying to make a personal assistant. Like alexa.

4 points6 comments
Open on Reddit
About this post
Posted
Archived
Score
4 · 71% up
Kind
Text
ID
mdwhy7

Author

16
posts
37
comments
0
media
View profile

6 comments

You most likely want to use something other than PulseAudio.

Pulseaudio is nice for an easy sound setup, so most people avoid having to think of drivers, and all that. But it's also very hard to bend to one's will! I've several times had to interface directly with Alsa to make a new headset or some Bluetooth audio work. That's no more though, and it really is an amazing project (PulseAudio).

You are probably looking at interfacing directly with your Soundsystem, and not PulseAudio. This would be the easiest and most stable way.

I know of JACK but haven't had the need to use it yet: https://wiki.archlinux.org/index.php/JACK_Audio_Connection_Kit

Refer to this page https://wiki.archlinux.org/index.php/Sound_system

You mention PyAudio (which I can't recommend, it was started in 2006 and is still at v.0.2 making me think little development has occurred over the years, https://github.com/jleb/pyaudio).

FYI PyAudio built on this software: http://portaudio.com/ which interfaces directly with Alsa/OSS (refer to the sounds system page, I'm not saying Open-Source Software here) which PulseAudio also does.

https://github.com/bambocher/pocketsphinx-python

Is a project on standby (https://cmusphinx.github.io/2019/10/update/) and refers to this project instead: https://alphacephei.com/en/#opensource

Alpha Cephei primary mission is scientific one. We spent more than 10 years researching speech production, speech recognition and all related areas. We have made a significant progress in understanding the nature of such a marvelous communication method as speech.

At the same time we are also the experts in implementation of the state of the art algorithms in practical systems. We excelled our capabilities during numerous projects in many companies around the world.

https://alphacephei.com/en/#opensource

Here is the link to get started: https://alphacephei.com/vosk/

​

I would also refer to AI as the current way to go. So maybe go look into TensorFlow, and their beginner guides to get started. Speech recognition has had awesome advances in recent years, and it's all due to AI models being trained on awesome parameters, with no other than the best computer scientists in the world working to improve them. I actually had no idea there were non-big-tech projects out there.

Godspeed my friend. I appreciate reading up on this for a great morning, having some coffee, and learning a few things about the current state of speech recognition.

2 points

You probably don't want to use Python for this. Those were my cents.

1 points

How so? The language I'm most familiar at is Python though

1 points

It's an interpreted language, which I can almost guarantee isn't used by any of the existing assistants.

Now, if you're just looking to have some fun and implement some voice commands, Python might be all good. That is if you can make it interface with your computer. I'll have a look man, it actually sounds interesting. But yea, I know it's 'easy' to implement the Google assistant into things one is doing, but that's surely not what you're trying here? It can react to voice commands and do arbitrary things, but utilizing the already existing voice recognition software.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.