Skip to content

Instantly share code, notes, and snippets.

@schamp
Last active April 3, 2017 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schamp/670e32f657de7a998e8da692c8da2ff4 to your computer and use it in GitHub Desktop.
Save schamp/670e32f657de7a998e8da692c8da2ff4 to your computer and use it in GitHub Desktop.
To make speech recognition package work:
```
sudo aptitude install pocketsphinx
sudo aptitude install python-gst0.10 gstreamer-0.10 gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-pocketsphinx
```
Find your desired card with:
```
cat /proc/asound/cards
```
and then create /etc/asound.conf with following:
```
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
```
Replace "1" with number of your card determined above. Test using `alsamixer`
To be able to compile new grammars, etc.:
```
sudo aptitude install virtualenv sphinxbase-utils swig python-dev
virtualenv --system-site-packages venv
source venv/bin/activate
pip install --upgrade pip
cd speakpython/antlr-3.4/runtime/Python
python setup.py install
git cline https://github.com/sequitur-g2p/sequitur-g2p
cd sequitur-g2p
python setup.py install
vim ~/venv/bin/g2p.py
# replace #!/bin/python with #!/usr/bin/env python
# python MakeSpeechProject.py name name.sps
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment