Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-16-2009, 12:16 PM   #1 (permalink)
dht
Registered Member
 
Join Date: Mar 2009
Posts: 3
dht is on a distinguished road
Default Detect input audio level

I'd appreciate any expert's help,

I'm trying to trigger an event when a user stops speaking.
My approach is to trace a single input audio volume-level integer and to measure it through time.
I've looked into the aurioTouch and speakHere example.
The first utilize an FFT buffer which get parsed every time it is fills - i couldn't see how to determine the volume of the speech from it. The second doesn't do any sound analysis.

Do you know of a way?
Is there a mic-incoming-sound-level hidden var?
dht is offline   Reply With Quote
Old 03-17-2009, 02:12 AM   #2 (permalink)
dht
Registered Member
 
Join Date: Mar 2009
Posts: 3
dht is on a distinguished road
Default

anybody?
dht is offline   Reply With Quote
Old 03-28-2010, 12:15 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 1
iceman2 is on a distinguished road
Default

Quote:
Originally Posted by dht View Post
anybody?
hey dude, did you manage to figure this one out, i am in the same predicament
iceman2 is offline   Reply With Quote
Old 03-28-2010, 12:43 PM   #4 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Ypsilanti, Michigan
Age: 63
Posts: 1,549
RLScott is on a distinguished road
Default

If you are processing the audio in an audio input queue, then you can calculate the volume level for a given short block of time by taking the maximum and the minimum audio buffer values in that block. To determine when someone stops speaking, you would look for a drop in volume. But there are many parameters to consider: how much a drop do you want? how long must the drop persist? (You don't want to declare that they stopped speaking just because they took a breath.) You will probably have to fine-tune these and other parameters to get performance that is correct for your application.

Robert Scott
Ypsilanti, Michigan
RLScott is offline   Reply With Quote
Old 04-15-2010, 10:20 AM   #5 (permalink)
dht
Registered Member
 
Join Date: Mar 2009
Posts: 3
dht is on a distinguished road
Default Yess... i have - i'll try and find the code for you.

Quote:
Originally Posted by iceman2 View Post
hey dude, did you manage to figure this one out, i am in the same predicament
Yess... i have - i'll try and find the code for you.
dht is offline   Reply With Quote
Old 04-23-2010, 10:12 AM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 15
iliketomakestuff is on a distinguished road
Default

I'm really interested as well.. I'd love to get some sort of direction on how to go about this.
__________________
Flu Fighter is out now!
iliketomakestuff is offline   Reply With Quote
Old 04-23-2010, 01:04 PM   #7 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

All you have to do to detect the sound level is these 2 lines while the sound is being recorded:

Code:
    [avRecorder updateMeters];
    float level = [avRecorder peakPowerForChannel:0];
But make sure you read the documentation, and watch the levels a bit, as they are in dB from -50 up to 0. The article VU meter - Wikipedia, the free encyclopedia shows the real world meter that the level is imitating.
JasonR is offline   Reply With Quote
Old 04-23-2010, 01:20 PM   #8 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 15
iliketomakestuff is on a distinguished road
Default

Quote:
Originally Posted by JasonR View Post
All you have to do to detect the sound level is these 2 lines while the sound is being recorded:

Code:
    [avRecorder updateMeters];
    float level = [avRecorder peakPowerForChannel:0];
But make sure you read the documentation, and watch the levels a bit, as they are in dB from -50 up to 0. The article VU meter - Wikipedia, the free encyclopedia shows the real world meter that the level is imitating.
Wow, much simpler than I expected.. thanks so much!!!
__________________
Flu Fighter is out now!
iliketomakestuff is offline   Reply With Quote
Reply

Bookmarks

Tags
analysis, audio, open al, sound, speech

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 338
3 members and 335 guests
guusleijsten, Kryckter, LEARN2MAKE
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:48 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0