chore: restore product scaffold to rollback baseline
This commit is contained in:
@@ -358,7 +358,6 @@ Future<void> showVoiceDetailsSheet(
|
||||
required String pttBoundInputClass,
|
||||
required bool isTouchOnly,
|
||||
required rust.BridgeAudioProcessingConfig initialAudioConfig,
|
||||
bool onnxRuntimeAvailable = true,
|
||||
required ValueChanged<rust.BridgeTransmitMode> onModeChanged,
|
||||
required ValueChanged<int> onReleaseTailChanged,
|
||||
required ValueChanged<rust.BridgeAudioProcessingConfig> onAudioConfigChanged,
|
||||
@@ -389,7 +388,6 @@ Future<void> showVoiceDetailsSheet(
|
||||
pttBoundInputClass: pttBoundInputClass,
|
||||
isTouchOnly: isTouchOnly,
|
||||
initialAudioConfig: initialAudioConfig,
|
||||
onnxRuntimeAvailable: onnxRuntimeAvailable,
|
||||
onModeChanged: onModeChanged,
|
||||
onReleaseTailChanged: onReleaseTailChanged,
|
||||
onAudioConfigChanged: onAudioConfigChanged,
|
||||
@@ -413,7 +411,6 @@ class _VoiceSheetBody extends StatefulWidget {
|
||||
required this.pttBoundInputClass,
|
||||
required this.isTouchOnly,
|
||||
required this.initialAudioConfig,
|
||||
required this.onnxRuntimeAvailable,
|
||||
required this.onModeChanged,
|
||||
required this.onReleaseTailChanged,
|
||||
required this.onAudioConfigChanged,
|
||||
@@ -431,7 +428,6 @@ class _VoiceSheetBody extends StatefulWidget {
|
||||
final String pttBoundInputClass;
|
||||
final bool isTouchOnly;
|
||||
final rust.BridgeAudioProcessingConfig initialAudioConfig;
|
||||
final bool onnxRuntimeAvailable;
|
||||
final ValueChanged<rust.BridgeTransmitMode> onModeChanged;
|
||||
final ValueChanged<int> onReleaseTailChanged;
|
||||
final ValueChanged<rust.BridgeAudioProcessingConfig> onAudioConfigChanged;
|
||||
@@ -466,10 +462,6 @@ class _VoiceSheetBodyState extends State<_VoiceSheetBody> {
|
||||
_audioProcessing = AudioProcessingConfigState.fromConfig(
|
||||
widget.initialAudioConfig,
|
||||
);
|
||||
_audioProcessing.vadBackend = normalizedVadBackend(
|
||||
_audioProcessing.vadBackend,
|
||||
onnxRuntimeAvailable: widget.onnxRuntimeAvailable,
|
||||
);
|
||||
|
||||
// Poll audio stats at 250 ms so TX/RX counters and the level meter
|
||||
// update in real time while the sheet is open, independent of the parent.
|
||||
@@ -785,32 +777,15 @@ class _VoiceSheetBodyState extends State<_VoiceSheetBody> {
|
||||
const SizedBox(height: 2),
|
||||
SegmentedButton<rust.BridgeVadBackend>(
|
||||
style: voiceSegmentedButtonStyle(theme),
|
||||
segments: vadBackendSegmentsForAvailability(
|
||||
desktop: _isDesktopSileroVadHost,
|
||||
onnxRuntimeAvailable: widget.onnxRuntimeAvailable,
|
||||
),
|
||||
segments: _isDesktopSileroVadHost
|
||||
? desktopVadBackendSegments
|
||||
: vadBackendSegments,
|
||||
selected: {_audioProcessing.vadBackend},
|
||||
onSelectionChanged: (s) {
|
||||
setState(
|
||||
() => _audioProcessing.vadBackend = normalizedVadBackend(
|
||||
s.first,
|
||||
onnxRuntimeAvailable: widget.onnxRuntimeAvailable,
|
||||
),
|
||||
);
|
||||
setState(() => _audioProcessing.vadBackend = s.first);
|
||||
_notifyAudioConfig();
|
||||
},
|
||||
),
|
||||
if (_isDesktopSileroVadHost) ...[
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
widget.onnxRuntimeAvailable
|
||||
? 'Silero needs ONNX Runtime. WebRTC works without it.'
|
||||
: 'Silero is unavailable because ONNX Runtime was not found. WebRTC is selected.',
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
// Debug.
|
||||
const SizedBox(height: 8),
|
||||
|
||||
Reference in New Issue
Block a user