Thought
Thought

Reputation: 5846

Record audio file with a different pitch in Android

I'm working on a app that records Audio files in m4a format and sends to another user.

I want to add a effect of pitch when i record the file. For example i record my self talking and in the audio file created it would appear i inaled some hellium.

is there any way of doing this in Android?

this is what i use to record the audio file

private void startRecordingAudio() {

        mFileName = Environment.getExternalStorageDirectory().getAbsolutePath();
        String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
        mFileName +="/"+Environment.DIRECTORY_DOCUMENTS+"/"+ConfigApp.RECORDINGS_FOLDER+"/"+timeStamp+".m4a";
        currentFile = mFileName;

        mRecorder = new MediaRecorder();
        mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
        mRecorder.setOutputFile(mFileName);
        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

        try {
            mRecorder.prepare();
        } catch (IOException e) {
            Log.e(TAG, "prepare() failed");
        }
        mIsRecordingAudio = true;
        mRecorder.start();
    }

Upvotes: 0

Views: 73

Answers (1)

k3b
k3b

Reputation: 14755

I have read about gpl classlib TarsosDSP with a real time Pitch Shifting example application. i didn-t try it myself

Upvotes: 0

Related Questions