Implementing a VAD in Audacity

Audio software developers forum.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Implementing a VAD in Audacity

Permanent link to this post Posted by mszlazak » Sat Jun 06, 2009 5:44 pm

Currently, I have the fortune or misfortune of learning just enough about audio, audio file formats and voice activity detection (VAD) to try to create a VAD in Audacity.
I want to experiment with VAD's on .wav or .mpg files and see how various algorithms perform.
The first VAD algorithm I'd like to test is described here:

http://figment.cse.usf.edu/~sfefilat/da ... eBT5.3.pdf

Suggestions, pointers and help would be appreciated.
mszlazak
 
Posts: 14
Joined: Sat Jun 06, 2009 5:32 pm
Operating System: Please select

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by waxcylinder » Sat Jun 06, 2009 6:40 pm

In Audacity 1.3 the developers have kindly added Sound Activated Recording.

Go to Edit > Preferences > Sound Acticated Recording

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * * Audacity Wiki * * * * *
waxcylinder
Forum Staff
 
Posts: 9026
Joined: Tue Jul 31, 2007 11:03 am
Location: Manchester, UK
Operating System: Windows 10

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by mszlazak » Sat Jun 06, 2009 11:04 pm

Sound Activated Recording looks like it activates to sound versus silence.
This is not what a VAD does. A VAD activates to human voice versus non-voice and they should work in low SNR environments.
mszlazak
 
Posts: 14
Joined: Sat Jun 06, 2009 5:32 pm
Operating System: Please select

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by steve » Sun Jun 07, 2009 10:09 am

mszlazak wrote:The first VAD algorithm I'd like to test is described here:
http://figment.cse.usf.edu/~sfefilat/da ... eBT5.3.pdf

Link not working.

How much programming experience do you have?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44990
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by mszlazak » Sun Jun 07, 2009 3:01 pm

FYI: Definition of VAD.

http://en.wikipedia.org/wiki/Voice_Activity_Detection

I checked the link in my first post today and it works but here is the title of the paper if you are having problems. This papers method looks simple.

"Combining Speech Energy and Edge Information for Fast and Efficient Voice Activity Detection in Noisy Environments"

My programming experience is minimal or hobbyist and for the past decade has been restricted mostly to Javascript.
None in c/c++ but I can learn that to create a VAD module that works with Audacity.
mszlazak
 
Posts: 14
Joined: Sat Jun 06, 2009 5:32 pm
Operating System: Please select

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by steve » Sun Jun 07, 2009 3:35 pm

Tried the link again and it's working now - must have just been a glitch.

Without a lot of C programming experience I think that you will be struggling to make any headway into building Voice Activity Detection directly into Audacity (as a means of starting / stopping recording).

However, if you are thinking more of a non-realtime processing of recorded data for detecting areas of speech within a track, then I think you may have more success (though still very challenging). Audacity natively supports both Ladspa and Nyquist plug-ins. Without C+ experience, the Nyquist programming language is by far the easier. Nyquist is based on XLisp, and apart from the over-abundance of parentheses (you will need a text editor with parentheses matching) is a relatively easy language.

You can find information about Nyquist here: http://audacityteam.org/wiki/index.php? ... ist_Prompt
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44990
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by mszlazak » Sun Jun 07, 2009 5:50 pm

Yes, it would be for non-realtime processing.
I'd like to display the before and after VAD waveforms.
I'll check out Nyquist.
Thanks for the tip Steve.
mszlazak
 
Posts: 14
Joined: Sat Jun 06, 2009 5:32 pm
Operating System: Please select

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by steve » Sun Jun 07, 2009 6:47 pm

mszlazak wrote:I'd like to display the before and after VAD waveforms.

That's the easy bit. You just select the track before processing and press Ctrl+D . That will create a duplicate track. Process the copy and not the original and you have before and after.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44990
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by mszlazak » Sun Jun 07, 2009 11:13 pm

stevethefiddle wrote:You can find information about Nyquist here: http://audacityteam.org/wiki/index.php? ... ist_Prompt

Steve, I appreciate the pointers and help.
I have a comment on the Nyquist example given in the page. It seems to me that an audio demo could have been used instead of the text "Hello."
Instead, I went here, http://audacityteam.org/help/nyquist, then generated a tone and tried transforming it with the following inside the Nyquist Prompt.
(mult (ramp) s)

Second, is my .ny file in the Plug-Ins folder suppose to show up in Audacity's "Effect" drop down list?
I saved the following .ny file but "My Fade In" doesn't show up on the drop down list.

;nyquist plug-in
;version 1
;type process
;name "My Fade In"
;action "My Fading In..."
(mult (ramp) s)

Thanks again.
mszlazak
 
Posts: 14
Joined: Sat Jun 06, 2009 5:32 pm
Operating System: Please select

Re: Implementing a VAD in Audacity

Permanent link to this post Posted by steve » Mon Jun 08, 2009 11:14 pm

I think that Audacity is fussy about file names.
Rather than naming the file "My Fade-in.ny" name it "myfadein.ny"

Also, you need to restart Audacity for new plug-ins to be found.

Other than that, your script should work.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44990
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Next

Return to General Audio Programming



Who is online

Users browsing this forum: No registered users and 6 guests