Code Monkey home page Code Monkey logo

Comments (7)

YogarajRamesh avatar YogarajRamesh commented on July 26, 2024 1

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

from mwengine.

igorski avatar igorski commented on July 26, 2024

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 ).

from mwengine.

YogarajRamesh avatar YogarajRamesh commented on July 26, 2024

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

from mwengine.

igorski avatar igorski commented on July 26, 2024

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?.

from mwengine.

YogarajRamesh avatar YogarajRamesh commented on July 26, 2024

Thank you so much for your time @igorski

Yes you are correct

from mwengine.

YogarajRamesh avatar YogarajRamesh commented on July 26, 2024

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

Eagerly waiting for your reply.

Thanks in advance

from mwengine.

igorski avatar igorski commented on July 26, 2024

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();
    }

from mwengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.