Talking Tom Cat Clone App [duplicate] - iphone

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
iPhone voice changer
I want to make an applications similar to Talking Tom Cat, But i am not able to identify the approach for sound.
How I can convert my sound into cat sound?

Look up independent time pitch stretching of audio. It's a digital signal processing technique. One method that can be used is the phase vocoder technique of sound analysis/resynthesis in conjunction with resampling. There seem to be a couple companies selling libraries to do suitable time pitch modification.

The technique to convert a normal voice into a squeaky voice is called time-scale modification of speech. One way is to take the speech and reduce the pitch by a certain amount. Another approach is to stretch/compress the speech so that the frequencies in the voice get scaled by an appropriate amount. These are techniques in digital signal processing.

the great link to download the sample code that provides all your needs,here also refer here for gaining more knowledge regarding your question.
In the init method of the Sample Code of HelloWorldLayer.mm ,u can see three float values as
time = 0.7;
pitch = 0.8;
formant = pow(2., 0./12.);
just adjust the pitch value to 1.9,it would be really a nice cat sound!!!

Related

How to detect sound frequency for particular sound in iphone?

I'm doing an app where I want to detect sound frequency. How to detect frequency for particular sound like dog sound? Does anybody have tutorial or some sample codes?
Detecting a single frequency, or even computing a single FFT, is not a reliable method for differentiating a dog bark from other common sounds of around the same volume.
What might work is sound fingerprint analysis using MFCC's, followed by statistical pattern matching against a large enough "dog" sound database. Some pointers to the type of signal processing required might be answered here: Music Recognition and Signal Processing
This is non-trivial stuff more suited for multiple college textbook chapters than any short tutorial.
To detect the frequency, you can use a pitch detection algorithm like FFT.
Learn more here: http://en.wikipedia.org/wiki/Pitch_detection_algorithm
You can look at this project for working source code for iOS that uses FFT algorithm to detect frequencies:
https://github.com/hollance/SimonSings

iPhone audio frequency [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to detect sound frequency for particular sound in iphone?
I am seeking a way to find the frequency of mic input.
I can record my voice or a sin noise in a temporary file.
For the recording I am using the AVFoundation framework.
I used this framework to find the peak of the signal.
What can I do to find the frequency of the signal?
There is a quite good example project from Apple. Here is the link to the aurioTouch2 sample app:
https://developer.apple.com/library/ios/samplecode/aurioTouch2/Introduction/Intro.html
I guess you need to start using the CoreAudio Library instead of the AVFoundation. To get the frequency you probably need to use a FFT (Fast Fourier Transformation). This is done in the example above. It even visualizes a Spectogram (Frequency over time).
Or maybe this stackoverflow posts could help you:
Get Frequency for Audio Input on iPhone

Detect Heart Rate using iPhone Camera [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detecting heart rate using the camera
I am working on detecting pulse rate in iOS. I have done some search and now I am able to read heart beats using external bluetooth device which is capable of reading heart beats. But now I am ver curious about detecting pulse using iPhone camera. I am trying to understand How it can be done? What is actual theory behind that? Can any one have an idea behind this?
According to my search I found that I need to use camera in video mode. And I need to compare each frames from that video for colour changes. When our heart pumps blood into our body, colours are changed with every pump. So how will I get that colour change using camera or is there any other way to do this?
Someone at MIT Media Labs beat you to it :P
http://www.cardiio.com/
Click on "How it works".
I believe the gist of it was that the app measures the amount of light reflected off your face due to increase/decrease in blood. Based on this, they can determine your heart rate.
Don't know about the underlying algorithm. If I know, I wouldn't be sitting here, I'd be writing MIT apps :D
Apparently there is a threshold that is considered a "standard" heart rate.
Studies have shown that our heart rate measurements are within 3 bpm
of a clinical pulse oximeter when performed at rest in a well-lit
environment (Poh et al., Opt. Express 2010; Poh et al., IEEE Trans
Biomed Eng 2011).
You'll probably need some sophisticated equipment to record your results like a real heart rate measure machine so you can compare the RGB (in 255,255,255 triplets values) between different frames at different heart rate and also you have to make sure you're sitting in about the same exact environment with controlled lighting.
If you try to do it at home, you'll get no where. If the sky dims for example, you're going to get different RGBA value.

iPhone: CPU power to do DSP/Fourier transform/frequency domain?

I want to analyze MIC audio on an ongoing basis (not just a snipper or prerecorded sample), and display frequency graph and filter out certain aspects of the audio. Is the iPhone powerful enough for that? I suspect the answer is a yes, given the Google and iPhone voice recognition, Shazaam and other music recognition apps, and guitar tuner apps out there. However, I don't know what limitations I'll have to deal with.
Anyone play around with this area?
Apple's sample code aurioTouch has a FFT implementation.
The apps that I've seen do some sort of music/voice recognition need an internet connection, so it's highly likely that these just so some sort of feature calculation on the audio and send these features via http to do the recognition on the server.
In any case, frequency graphs and filtering have been done before on lesser CPUs a dozen years ago. The iPhone should be no problem.
"Fast enough" may be a function of your (or your customer's) expectations on how much frequency resolution you are looking for and your base sample rate.
An N-point FFT is on the order of N*log2(N) computations, so if you don't have enough MIPS, reducing N is a potential area of concession for you.
In many applications, sample rate is a non-negotiable, but if it was, this would be another possibility.
I made an app that calculates the FFT live
http://www.itunes.com/apps/oscope
You can find my code for the FFT on GitHub (although it's a little rough)
http://github.com/alexbw/iPhoneFFT
Apple's new iPhone OS 4.0 SDK allows for built-in computation of the FFT with the "Accelerate" library, so I'd definitely start working with the new OS if it's a central part of your app's functionality.
You cant just port FFT code written in C into your app...there is the thumb compiler option that complicates floating point arithmetic. You need to put it in arm mode

Change pitch of audio during playback on iPhone [duplicate]

This question already has answers here:
Real-time Pitch Shifting on the iPhone
(5 answers)
Closed 7 years ago.
What is the best way to accomplish this?
From what I have read so far, it seems you have to setup IO Remote (which is a pain itself). Do you need to do a FFT? Are there any examples out there?
Can I just speed up / slow down playback?
Thanks
OpenAL lets you pitch-shift with the AL_PITCH source property. Maybe you could run your audio through OpenAL and use that.
I've never developed for an iPhone, but if you have sufficient control over the buffer sent to the audiodevice, then you could do the following:
say you have a buffer read from an audiofile, if you send only every even sample to the audiodevice (probably put in some other buffer which is passed to some function), then it will double the frequency and half the time to play the file.
If you want something in between you need to compute in between samples or resample the audiofile = interpolate values between successive samples.