-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: AutoGain filter #12
Conversation
@alnitak thanks for the web support, I'm looking into it. I have added you plugin to internal builds and I hope to have some feedback for you next week! 👍 |
I got an exception on web checking if a device was initialised:
These checks work fine on IO platforms. Here is the code for ref: void _initRecordingDevice() {
if (!_flutterRecorder.isDeviceInitialized()) {
_flutterRecorder.init(
format: PCMFormat.s16le,
sampleRate: 16000,
channels: RecorderChannels.mono,
);
}
_startRecordingDevice();
}
void _startRecordingDevice() {
if (!_flutterRecorder.isDeviceStarted()) {
_flutterRecorder.start();
}
if (!_flutterRecorder.filters.autoGainFilter.isActive) {
_flutterRecorder.filters.autoGainFilter.activate();
}
}
void _stopRecordingDevice() {
if (_flutterRecorder.filters.autoGainFilter.isActive) {
_flutterRecorder.filters.autoGainFilter.deactivate();
}
if (_flutterRecorder.isDeviceStarted()) {
_flutterRecorder.stop();
}
}
void _disposeRecordingDevice() {
_stopRecordingDevice();
if (_flutterRecorder.isDeviceInitialized()) {
_flutterRecorder.deinit();
}
} |
Thanks @CillianMyles, I forgot some checks! FYI now the Also, the logs are managed by
|
Great news about the logging 🎉 I am now running into a number of other errors:
|
I see. After changing the WASM module it must be initialized asynchronously somewhere. I chose to initialize it in the I have to think about moving that initialization somewhere else! I'll update you |
The only safe way I found to initialize the WASM module is to do it in a JS script! So it should be added in the
Two little breaking changes have been added also:
Hope it's all fine now and you can try the autogain also on the web and thanks for your patience! |
Thanks for the continued fixes 🙏 Latest:
Which is happening during |
Ouch! That should not happen after adding With Firefox and Chrome, it doesn't happen to me. Maybe moving those |
Hey @alnitak 👋 Happy new year 🎉 Apologies for the delay in getting back to you here. The automatic gain seems to be working well. I will come back to you if I find any issues. Thanks you for the great work 🙏 |
I'm glad it worked, thanks for letting me know and happy new year to you too! |
Description
New autoGain filter for #7
loopback.dart
example usesflutter_soloud
to play audio back to the device from the microphone data stream. Please try it with a headset to prevent audio feedback.No web support yet.Web supported.Echo Cancellation
feat: Echo Cancellation #5 code is not yet ready and I don't know if it will be!Breaking change:
init
method is now asyncFilterType
renamed toRecorderFilterType
Closes #14
Type of Change