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

Is there possible to adjust the volume of latency or turn off those live voice feedback? #160

Closed
YogarajRamesh opened this issue Apr 24, 2022 · 7 comments
Assignees
Labels
awaiting reply improvement Enhancing existing functionality

Comments

@YogarajRamesh
Copy link

YogarajRamesh commented Apr 24, 2022

Hi @igorski ,

While recording, their is live voice feedback (latency). In some older device those voices feed back is delayed by more than 200 milliseconds. So we need option to adjust the volume of latency or mute the live voice feedback while recording for those particular device.

Is there possible to adjust the volume of latency or turn off those live voice feedback?

Thanks in advance @igorski

@igorski
Copy link
Owner

igorski commented Apr 24, 2022

Hi @YogarajRamesh the input channel used for recording the microphone is an AudioChannel like any other. As such, prior to invoking MWEngine.startOutputRecording() you can set the muted state using MWEngine.getInputChannel().setMuted( true ).

@YogarajRamesh
Copy link
Author

Hi @igorski ,

  1. When I set the input channel to mute by the following snippet. Then input Audio(voice) get muted. But the recorded output audio also Muted means I am getting output with out voice.

private class RecordOutputHandler implements View.OnClickListener {
@OverRide
public void onClick( View v ) {
_isRecording = !_isRecording;
_engine.getInputChannel().setMuted( true );
if ( _isRecording )
_engine.startOutputRecording( Environment.getExternalStorageDirectory().getAbsolutePath() + "/Download/testsm.wav" );
else
_engine.stopOutputRecording();
(( Button ) v ).setText( _isRecording ? R.string.rec_btn_off : R.string.rec_btn_on );
}
}

when i do the save with setRecordFromDeviceInputState. i am able to get the output with audio(voice).

_engine.getInputChannel().setMuted( true );
engine.setRecordFromDeviceInputState(
_isRecording,
Environment.getExternalStorageDirectory().getAbsolutePath() + "/Download/test/"+fname+".wav",
10000);

Thank you @igorski

@igorski
Copy link
Owner

igorski commented Apr 26, 2022

Maybe I misunderstood.

Am I correct that your intention is to:

Record the microphone input with the input muted during playback
And at the same time record the engine output including the input audible?.

@YogarajRamesh
Copy link
Author

Thank you so much for your time @igorski

Yes you are correct

@igorski igorski self-assigned this Apr 27, 2022
@igorski igorski added the improvement Enhancing existing functionality label Apr 27, 2022
@YogarajRamesh
Copy link
Author

Hi @igorski
Sorry to disturb you again, Did you have the time to check on this?

Eagerly waiting for your reply.

Thanks in advance

@igorski
Copy link
Owner

igorski commented Jun 11, 2022

Hi, this is added in commit 6fe1355

When output recording is activated AND input recording is activated with a muted input channel, the input is written into the disk output (but remains inaudible on the device as before, to prevent feedback loops).

    // activate input recording with muted monitoring
    MWEngineInstance.getInputChannel().setMuted( true );
    MWEngineInstance.recordInput( true );

    // record output handler
    if ( shouldRecordOutput ) {
        MWEngineInstance.startOutputRecording( Environment.getExternalStorageDirectory().getAbsolutePath() + "/path/file_name.wav" );
    } else {
        MWEngineInstance.stopOutputRecording();
    }

@YogarajRamesh
Copy link
Author

Hi @igorski
This function is working great. Thank you for your time and effort.

@igorski igorski closed this as completed Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply improvement Enhancing existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants