录音机eclipse Android剪辑 - 部分剪辑

时间:2015-03-03 09:12:40

标签: android eclipse audio-recording clipping

每个人都会读10个句子。我听了一些人的声音,然后我听到了声音。当我听到声音时,只有一部分会发出声音。

让我们说一个人说"学习非常重要" - 我听说"学习非常便利"。

有些部分被削减了。这是什么原因?

public static final int RECORDER_BPP = 16;
public static final String AUDIO_RECORDER_FILE_EXT_WAV = ".wav";
public static final String AUDIO_RECORDER_FOLDER = "Kayitlar";
public static final String AUDIO_RECORDER_TEMP_FILE = "record_temp.raw";
public static final int sampleRate = 16000;
public static final int channels = AudioFormat.CHANNEL_IN_MONO;
public static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;

public AudioRecord recorder = null;
private AudioTrack maPlayer = null;
public int bufferSize = AudioRecord.getMinBufferSize(sampleRate,channels,RECORDER_AUDIO_ENCODING);
public Thread recordingThread = null;
public boolean isRecording = false;
public Button start, stop;
public int counter = 1;
public String kisiDosyaAd;

public void startRecording(){
    recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
                                    sampleRate, channels,RECORDER_AUDIO_ENCODING,bufferSize);

    recorder.startRecording();
    isRecording = true;

    recordingThread = new Thread(new Runnable() {

            @Override
            public void run() {
                //counter = 1;
                    writeAudioDataToFile();
            }

0 个答案:

没有答案