Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Microphone Setup and Voice Command Setup

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
30 posts
  • 1
  • 2
  • Next
Author
Message
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

Microphone Setup and Voice Command Setup

  • Quote

Post by Squinky86 » Sun Sep 28, 2003 6:02 pm

EDIT: Side note: apparently this process is very selective for who it works for. You may experience dificulty setting it all up, and cvoicecontrol may want to eat system resources after a while.


In continuation of the speechd lets your computer speak dtt, I've noticed that many others want to talk to their computers. The short way:
  1. follow the speechd DT&T (optional)
  2. configure microphone
  3. emerge cvoicecontrol
  4. microphone_config
  5. model_editor
  6. write custom scripts executed on command
For those who need a little more verbosity:

Step 1:
After making sure you have festival working (speechd dtt), it's time to set up your microphone. If you already have your microphone working in linux, skip down to step 2. If you don't, I suggest gnome-alsamixer for configuring it correctly.

Code: Select all

emerge gnome-alsamixer
Run gnome-alsamixer and make sure you have the following set correctly:
  • The "Mic" section is unmuted and the "Rec." button under the volume slider is selected.
  • The "Capture" section is turned up and "Rec." is selected.
  • Some users may find that the microphone works better when "Mic Boost (+20dB)" is checked.
Save the volumes and exit.
The microphone should now be working. You can test it by talking into your microphone and you should hear your voice coming out of the speakers. If you don't get your microhpone working here, you can go ahead and install cvoicecontrol, but will be unable to run its configuration tools.

Step 2:
Now to install cvoicecontrol. This will be the voice recognition software that will call commands based on what you say.

Code: Select all

emerge cvoicecontrol
Step 3:
Now to run the cvoicecontrol setup, which will configure cvoicecontrol to your computer. WARNING: You MUST "killall artsd" or close any programs that are using your sound device, or these configuration programs will not work.

Code: Select all

microphone_config
The program here is pretty self explanatory. Just follow the on-screen directions.

Step 4:
Now that your microphone and cvoicecontrol are working together, it's time to set up the commands you want cvoicecontrol to run whenever you tell it to!

Code: Select all

model_editor
By default, model_editor opens a new model, that is, the file in which cvoicecontrol saves and loads your settings from. Select "Edit Speaker Model". Press "a" to add a new item to this new model. Hit enter to edit the item. Make sure you give this new item an original title ("l" key), the command you want it to issue ("c"), and you're ready to record some samples of your voice for this command. Record at least four samples of your voice ("r") for each command to make sure cvoicecontrol will pick up what you're saying correctly. When you're done, hit "b" to go back and add as many commands as you want to this model. When you are done, "Save Speaker Model" and exit.

Step 5:
It's time to run cvoicecontrol for the first time! Make sure nothing is using your sound card, and run:

Code: Select all

cvoicecontrol /path/to/savedmodel
Talk into your microphone and whatever you set in the model_editor should work.

Step 6:
Now we'll get into some fun stuff. If you installed the optional festival text-to-speech program, you can make some custom scripts for your computer. I suggest making a directory somewhere in your home directory to store these scripts. Make sure they are executable (chmod +x)! For compatibility's sake, I will use the pipe method of sending text to festival, though you can change this accordingly.
  1. You say, "What time is it?" The following script is called:

    Code: Select all

    #!/bin/bash
    # Speak a few lines
    (echo "Today is"; date +%A; echo "and the current time is"; date +%I:%M\ %P) | festival --tts
  2. Be creative and make your own scripts. Maybe things like, "What is today's fortune?" running "fortune -s | festival --tts".
That's it! If you have any other fun things to do with festival + cvoicecontrol, post them here.
Here are some words of warning for all males reading this: If you have a female voice installed for festival, I suggest you remove cvoicecontrol now. After a few weeks, you'll realize how terribly lonely you really are. Take it from a geek who has been there. Nothing beats the real thing- get a real woman! (I'm being facetious)

Edit:
  • fixed fortune call (20030928)
  • fixed wording and format (20030929)
  • changed title to reflect contents better (20030929)
  • removed 2.6 kernel suggestion (20040221)
Last edited by Squinky86 on Sat Feb 21, 2004 8:20 pm, edited 8 times in total.
Me
Top
Anior
Guru
Guru
User avatar
Posts: 317
Joined: Thu Apr 17, 2003 10:52 pm
Location: European Union (Stockholm / Sweden)

  • Quote

Post by Anior » Sun Sep 28, 2003 10:24 pm

Great fun squinky and a nice guide it is too.

However, a little - managed to drop out of the last example.
"fortune | festival -tts" should be "fortune | festival --tts"

Just in case somebody got confused :)
Last edited by Anior on Wed Sep 08, 2004 3:26 pm, edited 1 time in total.
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Mon Sep 29, 2003 12:16 am

ah, thank you. If you see any errors, be sure to bring them up so I can fix them in the main post ;).
Me
Top
kalisphoenix
Apprentice
Apprentice
User avatar
Posts: 211
Joined: Sun Sep 28, 2003 10:03 am
Location: Ohio
Contact:
Contact kalisphoenix
Website

  • Quote

Post by kalisphoenix » Mon Sep 29, 2003 2:52 am

Now to run the cvoicecontrol setup, which will configure cvoicecontrol to your computer. WARNING: You MUST "killall artsd" or close any programs that are using your sound device, or these configuration programs will not work.
Not only do the programs work, but they create VERY interesting sound effects that you can use in a variety of interesting music programs.

8) [/quote]
Top
Qball
Apprentice
Apprentice
User avatar
Posts: 196
Joined: Mon Nov 25, 2002 9:35 am

  • Quote

Post by Qball » Wed Oct 01, 2003 2:07 pm

cvoicecontrol is using 100% cpu.. any ideas how to solve it? I forgot.
Top
Roguelazer
Veteran
Veteran
User avatar
Posts: 1233
Joined: Mon Feb 10, 2003 8:49 pm
Location: San Francisco, CA
Contact:
Contact Roguelazer
Website

  • Quote

Post by Roguelazer » Wed Oct 01, 2003 7:39 pm

Mmmm... This is fun. I already have my computer saying "You're welcome" every time someone says thank you. You forgot a tip. If you want some REAL fun, take your very long and complicated model and change the input device for sound from MIC to CD, then put in your favourite vocal CD. :D
Registered Linux User #263260
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Thu Oct 02, 2003 6:09 pm

Qball wrote:cvoicecontrol is using 100% cpu.. any ideas how to solve it? I forgot.
Hmm, this happened to me a couple times when I was first setting up, but it hasn't happened to me as much recently. All I could figure was that something wasn't configured properly. Does this happen every time you start cvoicecontrol? Let it run for a minute without your microphone plugged in- something might just be cluged up that needs sorted through.
Roguelazer wrote:change the input device for sound from MIC to CD, then put in your favourite vocal CD. :D
Glad your having fun. I'm debating putting a warning up, though:
WARNING: may cause loss of social life. Your computer isn't a real person.
Me
Top
lukasfischer
Tux's lil' helper
Tux's lil' helper
Posts: 101
Joined: Wed Aug 20, 2003 11:36 pm
Location: Innsbruck

  • Quote

Post by lukasfischer » Wed Oct 22, 2003 2:21 pm

are there any special hardware requirements for cvoicecontrol?
i could get it running on a very old ISA advances logic card, but not on the emu10k1 or the es1371! utterance levels and recordings are ok, but nothing is recognized, only the CPU load is at 100% all the time :(

i'm using alsa and oss emulation.
Top
Clete2
Guru
Guru
Posts: 532
Joined: Sat Aug 09, 2003 2:49 pm

  • Quote

Post by Clete2 » Thu Oct 23, 2003 10:31 pm

microphone_config doesn't work here... Can someone post me their config file and where to put it? It keeps on going. My microphone works fine... It just will never tell me to stop talking.
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Thu Oct 23, 2003 10:53 pm

It looks like a lot of people are having trouble and running into little bugs here and there, so I put a little warning at the top of the main post. I'd like to see more development on cvoicecontrol.
Clete2 wrote:Can someone post me their config file and where to put it?
~/.cvoicecontrol/config

Code: Select all

Mixer Device    = /dev/mixer
Audio Device    = /dev/dsp
Mic Level       = 94
IGain Level     = 0
Record Level    = 5021
Stop Level      = 2711
Silence Level   = 401
Channel Mean    = 16.24192 9.33539 7.18034 5.85963 5.16997 4.52275 4.06734 3.89661 3.98458 3.96453 3.86085 3.95885 3.95009 3.97331 4.01739 3.78486
That "Channel Mean = # # #..." all goes on one line.
Me
Top
Clete2
Guru
Guru
Posts: 532
Joined: Sat Aug 09, 2003 2:49 pm

  • Quote

Post by Clete2 » Thu Oct 23, 2003 11:05 pm

Weird, I hear myself out of the speakers... (Thanks for the file by the way)... And it won't quite work, the config thing where you record a sample... Doesn't work... It will sit there when recording and I can press all the keys I want, but it won't quit recording... I said the command and no matter what, it won't record :(...

Yeah, very selective on who it feels like working for...
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Thu Oct 23, 2003 11:24 pm

In the model editor, make sure you speak loudly and with extreme orthographic care. I noticed that small one-or-two sylable words will make model_editor not want to pick up the command. This may or may not be your problem, but I do agree with you, the software needs to be developed more before put under any major use. As of right now, this is really only a tool to use at lan parties to impress your friends. I haven't seen an update from cvoicecontrol in months, and it's still in alpha. Sorry it isn't working for you :(.

From the cvoicecontrol website:
Note: Since I am a full-time employee in the Speech and Language processing department at BBN Technologies it is virtually impossible for me to continue my development efforts on CVoiceControl. As a consequence, I do not intend to support CVoiceControl anymore. Anyone who is interested in taking over and advancing this project please feel free to contact me at daniel@kiecza.net.
I wish I knew more about programming. Linux needs a project like this under development.
Last edited by Squinky86 on Thu Oct 23, 2003 11:27 pm, edited 1 time in total.
Me
Top
Clete2
Guru
Guru
Posts: 532
Joined: Sat Aug 09, 2003 2:49 pm

  • Quote

Post by Clete2 » Thu Oct 23, 2003 11:26 pm

Ok, thanks for the help. I set it to something simple. "open"... I will try again later...
Top
colfax4
n00b
n00b
Posts: 4
Joined: Thu Nov 13, 2003 11:44 pm
Location: H-town, Alabama
Contact:
Contact colfax4
Website

emu10k1/100% CPU problem

  • Quote

Post by colfax4 » Thu Nov 13, 2003 11:49 pm

I've got a Sound Blaster Live! value using the emu10k1 driver. My problem is similar to a post already made about this driver using alsa with oss emulation. No matter what, nothing is recognized and my CPU shoots up to 100% every time. Has anyone else had success with this driver/card... if not. Would someone recommend a good card that cvoicecontrol works well for?

Thanks.

Colfax
Top
BWoso
l33t
l33t
User avatar
Posts: 920
Joined: Wed Dec 31, 2003 5:20 am
Location: Cleveland Ohio, USA

  • Quote

Post by BWoso » Thu Sep 02, 2004 2:26 am

I am having some problems with this setup, I'm sure it's something easy but I don't know how to fix it. Here is what I have done:

Code: Select all

emerge cvoicecontrol
-snip-
clear root # cvoicecontrol setup
Failed to read config file: /root/.cvoicecontrol/config
Please run 'microphone_config' first!
Couldn't load configuration!Please run microphone_config before using this application!
clear root # microphone_config
No mixer devices available!
Please purchase a sound card and install it!
I have an audigy 2 sound card which works, and a microphone that works with it. Here is my lspci output.

Code: Select all

clear root # lspci
0000:00:00.0 Host bridge: Intel Corp.: Unknown device 2578 (rev 02)
0000:00:01.0 PCI bridge: Intel Corp.: Unknown device 2579 (rev 02)
0000:00:1d.0 USB Controller: Intel Corp.: Unknown device 24d2 (rev 02)
0000:00:1d.1 USB Controller: Intel Corp.: Unknown device 24d4 (rev 02)
0000:00:1d.2 USB Controller: Intel Corp.: Unknown device 24d7 (rev 02)
0000:00:1d.3 USB Controller: Intel Corp.: Unknown device 24de (rev 02)
0000:00:1d.7 USB Controller: Intel Corp.: Unknown device 24dd (rev 02)
0000:00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB PCI Bridge (rev c2)
0000:00:1f.0 ISA bridge: Intel Corp.: Unknown device 24d0 (rev 02)
0000:00:1f.1 IDE interface: Intel Corp.: Unknown device 24db (rev 02)
0000:00:1f.3 SMBus: Intel Corp.: Unknown device 24d3 (rev 02)
0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0322 (rev a1)
0000:02:02.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
0000:02:02.1 Input device controller: Creative Labs SB Audigy MIDI/Game port (rev 04)
0000:02:02.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port (rev 04)
0000:02:08.0 Ethernet controller: Intel Corp.: Unknown device 1050 (rev 02)
0000:02:0a.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)
Which obviously shows my sound card. How do I make the setup see my soundcard?
I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!

The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Thu Sep 02, 2004 3:03 am

Do you have a /dev/mixer device?
Me
Top
BWoso
l33t
l33t
User avatar
Posts: 920
Joined: Wed Dec 31, 2003 5:20 am
Location: Cleveland Ohio, USA

  • Quote

Post by BWoso » Thu Sep 02, 2004 3:05 am

No... how do I make that?
I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!

The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Top
Squinky86
Retired Dev
Retired Dev
Posts: 309
Joined: Tue Mar 25, 2003 5:51 am
Location: Alabama, USA
Contact:
Contact Squinky86
Website

  • Quote

Post by Squinky86 » Thu Sep 02, 2004 3:21 am

On my system, I have a 2.6 kernel, and I had to enable
Drivers --> Sound --> ALSA --> OSS Mixer API
Me
Top
megalomani
Tux's lil' helper
Tux's lil' helper
Posts: 77
Joined: Tue Jun 08, 2004 4:27 pm

  • Quote

Post by megalomani » Sat Sep 18, 2004 2:02 pm

Make sure your mic is working. Just feedback from the speakers isn't enough.

I had to do chgroup audio /dev/audio

and add the user to the group audio.

Test the recording with for example krec
Top
Vanquirius
Retired Dev
Retired Dev
User avatar
Posts: 1297
Joined: Fri Jun 14, 2002 9:07 pm
Location: Ethereal plains
Contact:
Contact Vanquirius
Website

  • Quote

Post by Vanquirius » Sat Sep 18, 2004 7:34 pm

Works nice with the one command I got it to understand so far: icq (opens gaim)... It doesn't like the way I say firefox, however.

[edit]Saying "fox" alone works :-)[/edit]
Hello.
Top
undrwater
Guru
Guru
User avatar
Posts: 319
Joined: Tue Jan 28, 2003 2:25 am
Location: Caucasia

  • Quote

Post by undrwater » Wed Oct 13, 2004 3:05 pm

I'm planning on using this for Halloween!

I'll have my neice record the "Trick or Treat" instances...now I just have to figure what the response should be...."smell my feet" is a bit obvious! ;)

As for the sounblaster cards...in alsamixer, check to be sure which mic is selected. In my case Mic2 was set as the default, which was incorrect...selecting Mic 1 fixed it.
Open-mindedness is painful...
Top
Firewalker
n00b
n00b
User avatar
Posts: 22
Joined: Sun Sep 19, 2004 8:10 am

  • Quote

Post by Firewalker » Sun Oct 17, 2004 8:16 pm

Hmm, everything works fine but when i start cvoicecontrol it breaks... is anybody on this project atm? Maybe i should dig a bit into c programing....
I still pretend to be real...
Top
undrwater
Guru
Guru
User avatar
Posts: 319
Joined: Tue Jan 28, 2003 2:25 am
Location: Caucasia

  • Quote

Post by undrwater » Mon Oct 18, 2004 4:46 pm

Firewalker wrote:Hmm, everything works fine but when i start cvoicecontrol it breaks... is anybody on this project atm? Maybe i should dig a bit into c programing....
What do you mean it breaks? Maybe just a broken install or missing dependencies?
Open-mindedness is painful...
Top
mirko_3
l33t
l33t
User avatar
Posts: 605
Joined: Sun Nov 02, 2003 4:14 pm
Location: Birreria

  • Quote

Post by mirko_3 » Fri Jun 10, 2005 12:52 pm

I'm trying to follow this howto, but it seems that I get the same errer as above:

Code: Select all

No mixer devices available!
Please purchase a sound card and install it!
This even happens as root, so it's not a permission problem...
Non fa male! Non fa male!
Top
yodi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 88
Joined: Fri May 14, 2004 1:56 pm
Location: Liverpool, England

  • Quote

Post by yodi » Sun Jun 26, 2005 9:31 am

Getting the same error as mirko_3 here, although Teamspeak uses the OSS alsa modules with the mic fine which is odd.
All Servers :: Offline [no connection]
Gallery :: Visit Here
Homepage :: Visit Here
Top
Post Reply

30 posts
  • 1
  • 2
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy