2017-10-06 1 views
0

私は何も見つけられないどこでも検索します。アンドロイドのメディアレコーダーに効果を加えるには?

アンドロイドのファイルオーディオにどのように影響を与えますか?

これは私のコードであるあなたが私を助けている場合...

mRecorder = new MediaRecorder(); 
     mRecorder.setMaxDuration(180000); 
     mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
     mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); 

     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { 
      mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC); 
      mRecorder.setAudioEncodingBitRate(50000); 
     } else { 
      mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); 
      mRecorder.setAudioEncodingBitRate(50000); 
     } 

     mRecorder.setAudioSamplingRate(50000); 
     mOutputFile = getOutputFile(); 
     mOutputFile.getParentFile().mkdirs(); 
     mRecorder.setOutputFile(mOutputFile.getAbsolutePath()); 


     mRecorder.setAudioEncodingBitRate(50000); 
     mRecorder.setAudioSamplingRate(50000); 
     try { 
      mRecorder.prepare(); 
      mRecorder.start(); 
      mStartTime = SystemClock.elapsedRealtime(); 
      mHandler.postDelayed(mTickExecutor, 100); 
     } catch (IOException e) { 
     } 

はどうもありがとうございました!!!!!!

+0

私はメディアレコーダーを使用してこれを行うことはできません。もっと深く、AudioCodecクラス(https://developer.android.com/reference/android/net/rtp/AudioCodec.html)を使用する必要があります。 – Jlange

答えて

0

解決策Sonicと呼ばれるライブラリ。基本的にはPSOLA algoを使ってピッチとテンポを変えるSpeech用です。でも、大丈夫です。

あなたは音声をスピードアップまたはスローダウンし、音声を子供または女性またはおばあちゃんに変更できます。

関連する問題