2
我正在錄製音頻。錄音後我想改變音高而不改變頻率。 並保存在SD卡上的文件。所有這些都需要在後臺線程中完成。如何更改錄製音頻的音調並保存在背景中?
我試過這個鏈接,但這是改變頻率,也不在背景中。
http://android-er.blogspot.in/2014/04/audiorecord-and-audiotrack-and-to.html
我正在錄製音頻。錄音後我想改變音高而不改變頻率。 並保存在SD卡上的文件。所有這些都需要在後臺線程中完成。如何更改錄製音頻的音調並保存在背景中?
我試過這個鏈接,但這是改變頻率,也不在背景中。
http://android-er.blogspot.in/2014/04/audiorecord-and-audiotrack-and-to.html
運行一個後臺線程,並使用下面的代碼MediaRecorder錄製音頻,有助於記錄的背景語音呼叫,並將其寫入文件到SD卡
private void startRecording() {
filePath = getFilename();
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
recorder.setOutputFile(filePath);
recorder.setOnErrorListener(errorListener);
recorder.setOnInfoListener(infoListener);
recorder.getMaxAmplitude();
try {
if (recorder != null) {
recorder.prepare();
recorder.start();
}
} catch (IllegalStateException e) {
Log.d(LOG_TAG, e.toString());
} catch (IOException e) {
} catch (Exception e) {
Log.d(LOG_TAG, e.toString());
}
}
private String getFilename() {
File filepath = Environment.getExternalStorageDirectory();
File dir = new File(filepath.getAbsolutePath()
+ "/Android");
if (!dir.exists()) {
dir.mkdirs();
}
String uriSting = (dir.getAbsolutePath() + "/"
+ System.currentTimeMillis() + ".mp3");
return uriSting;
}
我想改變音高。我已經錄製了音頻。 – 2014-10-07 05:28:33
檢查此鏈接http://stackoverflow.com/questions/5156192/programmatically-increase-the-pitch-of-an-array-of-audio-samples – rajahsekar 2014-10-08 04:44:20