Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing from AudioRecord to Superpowered SDK for audio recording #132

Open
priyankjain12 opened this issue Mar 19, 2021 · 0 comments
Open

Comments

@priyankjain12
Copy link

priyankjain12 commented Mar 19, 2021

Hi, I have changed the recording functionality of the application form using the AudioRecord to the Superpowered SDK as it's faster than the default AudioRecord. Now the thing is that I have initialized the "record_processor.cc" file in c++ with this sample rate and buffer size in the "AudioRecordRecorderServiceImpl.kt" file.

        val audioManager =
            context.getSystemService(AppCompatActivity.AUDIO_SERVICE) as? AudioManager
        if (audioManager != null) {
            sampleRateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE)
            bufferSizeString =
                audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER)
        }
        if (sampleRateString == null) sampleRateString = "48000"
        if (bufferSizeString == null) bufferSizeString = "480"
        val sampleRateInt = sampleRateString.toInt()
        val bufferSizeInt = bufferSizeString.toInt()

        recordProcessor = AudioRecordProcessor()
        recordProcessor?.initAudioBufferSize(sampleRateInt, bufferSizeInt, speed)

After integrating the Superpowered SDK, I am able to run the project and do the actual recording but the recorded video has distorted audio or we can say that there is much noise in the produced video. So is there any way to solve this issue? Can you please guide me here?

I am attaching your project with superpowered SDK as a reference to what I have done.

You can check the "Android_JNI_audio_record_processor_init" and "Android_JNI_audio_record_processor_flush_audio_buffer_to_queue" method from the trinity_jni.cc to see my implementation of the Superpowered SDK.

So can you please guide me or help me in removing the noise in the recorded video.

Trinity with the superpowered project - https://drive.google.com/file/d/109L5As8MvOGkmadZn-RqJAMSreH8AazL/view?usp=sharing

Short link - http://bit.ly/trinitysuper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant