나는 정확한 (정확하게 아기 울기 위해) 목소리를 알아야하는 응용 프로그램을 개발 중입니다. 필자는 iPhone 마이크에 소리를 녹음하고 샘플을 샘플로 인용했습니다.iPhone : 정확히 사람의 목소리를 알아 두시오.
http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/ http://developer.apple.com/library/ios/#samplecode/aurioTouch/Introduction/Intro.html http://developer.apple.com/library/ios/#samplecode/SpeakHere/Introduction/Intro.html
...하지만 난 정확하게 구별 할 수있는 방법하지 않았다 다른 목소리의 인간 목소리. 이것에 대한 도움이나 샘플 코드는 정말 도움이 될 것입니다.
-(void)levelTimerCallback:(NSTimer *)timer {
[recorder updateMeters];
const double ALPHA = 0.05;
double peakPowerForChannel = pow(10, (0.05 * [recorder peakPowerForChannel:0]));
lowPassResults = ALPHA * peakPowerForChannel + (1.0 - ALPHA) * lowPassResults;
NSLog(@"frequency: %f", lowPassResults);
NSLog(@"Average input: %f Peak input: %f", [recorder averagePowerForChannel:0], [recorder peakPowerForChannel:0]);
if (lowPassResults < 0.95)
[self playSound];
}
감사 :
은 지금까지 나는 다음과 같은 코드를 썼습니다.
아하 ... 코드를 추가하는 것을 잊어 버렸습니다. :) - (void) levelTimerCallback : (NSTimer *) timer { \t [recorder updateMeters]; \t const double ALPHA = 0.05; \t double peakPowerForChannel = pow (10, (0.05 * [레코더 peakPowerForChannel : 0]))); \t lowPassResults = ALPHA * peakPowerForChannel + (1.0 - ALPHA) * lowPassResults; \t \t NSLog (@ "frequency : % f", lowPassResults); NSLog (@ "평균 입력 : % f 피크 입력 : % f", [레코더 averagePowerForChannel : 0], [레코더 peakPowerForChannel : 0]); \t if (lowPassResults <0.95) \t \t [self playSound]; } – applefreak
기본적으로 http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/에서 제공된 코드를 사용했습니다. 앤드류의 대답에 기초하여 나는 아기 울음 소리를 인식 할 수 없을 것이라고 생각합니다. 어쨌든 아기 울음 소리에 대한 위의 코드에서 lowPassResults의 가치가 무엇인지 알아내는 방법이 있습니까? 주파수/진폭이 다른 소리를 나타내는 문서가 있습니까? – applefreak