TarsosDSP icon indicating copy to clipboard operation
TarsosDSP copied to clipboard

Compress

Open vivekpchrome opened this issue 5 years ago • 4 comments

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

vivekpchrome avatar Aug 27 '20 05:08 vivekpchrome

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

qzic avatar Aug 27 '20 13:08 qzic

Thank you for your response but the file is recording on Android phone and I have to upload it to the server since the size of the file is too much so I need that the file size will reduce , as per I have checked the writerProcessor is processing direct data that's why it is high in size .

On Thu, 27 Aug, 2020, 7:08 pm Quentin Meek, [email protected] wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JorenSix/TarsosDSP/issues/191#issuecomment-681954454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJW7PTUJX3LZ3WKEEWZQKY3SCZOVJANCNFSM4QMSFN4A .

vivekpchrome avatar Aug 27 '20 13:08 vivekpchrome

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

qzic avatar Aug 27 '20 14:08 qzic

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?

}

vivekpchrome avatar Aug 28 '20 08:08 vivekpchrome