JorenSix / TarsosDSP

A Real-Time Audio Processing Framework in Java

Home Page:http://0110.be/tag/TarsosDSP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compress

vivekpchrome opened this issue · comments

Hi, Anyone can tell me how to compress the audio file size since the recording gives me a bigger file

Monkeys Audio compresses audio files on PC. Flac audio format is another solution, not sure if it's open source.

Maybe you could extract the compression code and port to Java/Android from here https://github.com/xiph/flac

I have changed my logic, I am not using Tarso for the recording in Android I have used my class to record the audio and I need pitch also while recording, I have data in a byte from the audio recorder Can you tell me how I will convert into the float buffer so I can use Tarso pitch Detection Handler

public void audioData(byte[] audioRecordData){

    TarsosDSPAudioFormat format = getTargetAudioFormat(44100);
    TarsosDSPAudioFloatConverter converter = TarsosDSPAudioFloatConverter.getConverter(format);
 //converter.toFloatArray(audioRecordData, 0, audioFloatBuffer, 0, bufferSize-1); //this line parameters  in tarso it is inside AudioDispatcher

//
I will get the pitch like this -:
PitchDetector pitchDetector = new FastYin(44100, 8000);
pitchDetector.getPitch(final float[] audioBuffer); //I will pass the float buffer here

//Am I right?

}