mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(voice): make RNNoise the default noise suppression (#3103)
This commit is contained in:
@@ -386,6 +386,17 @@ export function applyLegacyNoiseSuppressionNoneMigrationV1(parsed: Record<string
|
||||
return changed;
|
||||
}
|
||||
|
||||
function applyDeepFilterDefaultRetiredMigrationV1(parsed: Record<string, unknown>): boolean {
|
||||
if (parsed.deepFilterDefaultRetiredMigratedV1 === true) {
|
||||
return false;
|
||||
}
|
||||
if (parsed.noiseSuppressionBackendPrefV1 === 'deep_filter') {
|
||||
parsed.noiseSuppressionBackendPrefV1 = null;
|
||||
}
|
||||
parsed.deepFilterDefaultRetiredMigratedV1 = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function validateNoiseSuppressionBackend(value: unknown): VoiceNoiseSuppressionBackend | null {
|
||||
return isVoiceNoiseSuppressionBackend(value) ? value : null;
|
||||
}
|
||||
@@ -460,6 +471,7 @@ class VoiceSettings {
|
||||
screenShareHevcOptIn = false;
|
||||
screenShareAv1OptOutMigratedV1 = false;
|
||||
screenShareHevcOptOutMigratedV1 = false;
|
||||
deepFilterDefaultRetiredMigratedV1 = false;
|
||||
screenShareContentHintPrefV2: ScreenShareContentHint = DEFAULT_SCREEN_SHARE_CONTENT_HINT;
|
||||
screenShareContentHintDefaultMigratedV1 = false;
|
||||
screenShareSoftwareQualityRetiredV1 = false;
|
||||
@@ -583,6 +595,7 @@ class VoiceSettings {
|
||||
changed = applyScreenShareSoftwareQualityRetiredMigrationV1(parsed) || changed;
|
||||
changed = applyScreenShareBackupCodecModeRetiredMigrationV1(parsed) || changed;
|
||||
changed = applyLegacyNoiseSuppressionNoneMigrationV1(parsed) || changed;
|
||||
changed = applyDeepFilterDefaultRetiredMigrationV1(parsed) || changed;
|
||||
if (changed) {
|
||||
AppStorage.setItem('VoiceSettings', JSON.stringify(parsed));
|
||||
}
|
||||
@@ -590,6 +603,7 @@ class VoiceSettings {
|
||||
this.screenShareAv1OptOutMigratedV1 = parsed.screenShareAv1OptOutMigratedV1 === true;
|
||||
this.screenShareHevcOptOutMigratedV1 = parsed.screenShareHevcOptOutMigratedV1 === true;
|
||||
this.manualAudioSourcesOptOutResetMigratedV1 = parsed.manualAudioSourcesOptOutResetMigratedV1 === true;
|
||||
this.deepFilterDefaultRetiredMigratedV1 = parsed.deepFilterDefaultRetiredMigratedV1 === true;
|
||||
} catch (error) {
|
||||
logger.warn('Failed to migrate persisted voice settings:', error);
|
||||
}
|
||||
@@ -643,6 +657,7 @@ class VoiceSettings {
|
||||
'screenShareHevcOptIn',
|
||||
'screenShareAv1OptOutMigratedV1',
|
||||
'screenShareHevcOptOutMigratedV1',
|
||||
'deepFilterDefaultRetiredMigratedV1',
|
||||
'screenShareContentHintPrefV2',
|
||||
'screenShareContentHintDefaultMigratedV1',
|
||||
'screenShareSoftwareQualityRetiredV1',
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import type {ResolvedVoiceProcessing} from '@app/features/voice/utils/VoiceProcessingProfile';
|
||||
|
||||
const NOISE_SUPPRESSION_SAMPLE_RATE = 48000;
|
||||
const DEFAULT_NOISE_SUPPRESSION_BACKEND: VoiceNoiseSuppressionBackend = 'deep_filter';
|
||||
const DEFAULT_NOISE_SUPPRESSION_BACKEND: VoiceNoiseSuppressionBackend = 'rnnoise';
|
||||
|
||||
export function readNoiseSuppressionRuntimeCapabilities(): NoiseSuppressionRuntimeCapabilities {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user