Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Microphone Setup and Voice Command Setup
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Sun Sep 28, 2003 6:02 pm    Post subject: Microphone Setup and Voice Command Setup Reply with quote

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:
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:
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:
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:
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:
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:
    #!/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)

_________________
Me


Last edited by Squinky86 on Sat Feb 21, 2004 8:20 pm; edited 8 times in total
Back to top
View user's profile Send private message
Anior
Guru
Guru


Joined: 17 Apr 2003
Posts: 317
Location: European Union (Stockholm / Sweden)

PostPosted: Sun Sep 28, 2003 10:24 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Mon Sep 29, 2003 12:16 am    Post subject: Reply with quote

ah, thank you. If you see any errors, be sure to bring them up so I can fix them in the main post ;).
_________________
Me
Back to top
View user's profile Send private message
kalisphoenix
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 211
Location: Ohio

PostPosted: Mon Sep 29, 2003 2:52 am    Post subject: Reply with quote

Quote:

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]
Back to top
View user's profile Send private message
Qball
Apprentice
Apprentice


Joined: 25 Nov 2002
Posts: 196

PostPosted: Wed Oct 01, 2003 2:07 pm    Post subject: Reply with quote

cvoicecontrol is using 100% cpu.. any ideas how to solve it? I forgot.
Back to top
View user's profile Send private message
Roguelazer
Veteran
Veteran


Joined: 10 Feb 2003
Posts: 1233
Location: San Francisco, CA

PostPosted: Wed Oct 01, 2003 7:39 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Thu Oct 02, 2003 6:09 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
lukasfischer
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2003
Posts: 101
Location: Innsbruck

PostPosted: Wed Oct 22, 2003 2:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Clete2
Guru
Guru


Joined: 09 Aug 2003
Posts: 530
Location: Bloomington, Illinois

PostPosted: Thu Oct 23, 2003 10:31 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Thu Oct 23, 2003 10:53 pm    Post subject: Reply with quote

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:

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
Back to top
View user's profile Send private message
Clete2
Guru
Guru


Joined: 09 Aug 2003
Posts: 530
Location: Bloomington, Illinois

PostPosted: Thu Oct 23, 2003 11:05 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Thu Oct 23, 2003 11:24 pm    Post subject: Reply with quote

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:
Quote:
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.
_________________
Me


Last edited by Squinky86 on Thu Oct 23, 2003 11:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Clete2
Guru
Guru


Joined: 09 Aug 2003
Posts: 530
Location: Bloomington, Illinois

PostPosted: Thu Oct 23, 2003 11:26 pm    Post subject: Reply with quote

Ok, thanks for the help. I set it to something simple. "open"... I will try again later...
Back to top
View user's profile Send private message
colfax4
n00b
n00b


Joined: 13 Nov 2003
Posts: 4
Location: H-town, Alabama

PostPosted: Thu Nov 13, 2003 11:49 pm    Post subject: emu10k1/100% CPU problem Reply with quote

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
Back to top
View user's profile Send private message
BWoso
l33t
l33t


Joined: 31 Dec 2003
Posts: 920
Location: Cleveland Ohio, USA

PostPosted: Thu Sep 02, 2004 2:26 am    Post subject: Reply with quote

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:
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:
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-
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Thu Sep 02, 2004 3:03 am    Post subject: Reply with quote

Do you have a /dev/mixer device?
_________________
Me
Back to top
View user's profile Send private message
BWoso
l33t
l33t


Joined: 31 Dec 2003
Posts: 920
Location: Cleveland Ohio, USA

PostPosted: Thu Sep 02, 2004 3:05 am    Post subject: Reply with quote

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-
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Thu Sep 02, 2004 3:21 am    Post subject: Reply with quote

On my system, I have a 2.6 kernel, and I had to enable
Drivers --> Sound --> ALSA --> OSS Mixer API
_________________
Me
Back to top
View user's profile Send private message
megalomani
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2004
Posts: 77

PostPosted: Sat Sep 18, 2004 2:02 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Sat Sep 18, 2004 7:34 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 295
Location: Caucasia

PostPosted: Wed Oct 13, 2004 3:05 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Firewalker
n00b
n00b


Joined: 19 Sep 2004
Posts: 22

PostPosted: Sun Oct 17, 2004 8:16 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 295
Location: Caucasia

PostPosted: Mon Oct 18, 2004 4:46 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
mirko_3
l33t
l33t


Joined: 02 Nov 2003
Posts: 605
Location: Birreria

PostPosted: Fri Jun 10, 2005 12:52 pm    Post subject: Reply with quote

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

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!
Back to top
View user's profile Send private message
yodi
Tux's lil' helper
Tux's lil' helper


Joined: 14 May 2004
Posts: 88
Location: Liverpool, England

PostPosted: Sun Jun 26, 2005 9:31 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum