Skip to content

Commit 20d29e1

Browse files
shanselmanCopilot
andauthored
fix: bound silent WASAPI capture startup (#1123)
Co-authored-by: Copilot App <[email protected]>
1 parent f81c9fd commit 20d29e1

8 files changed

Lines changed: 960 additions & 153 deletions

File tree

‎src/OpenClaw.Tray.WinUI/Services/AudioPipeline.cs‎

Lines changed: 541 additions & 153 deletions
Large diffs are not rendered by default.

‎src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,9 @@ Use one of these options:
28282828
<data name="VoiceOverlayWindow_StatusErrorOccurred" xml:space="preserve">
28292829
<value>An error occurred</value>
28302830
</data>
2831+
<data name="AudioPipeline_FirstAudioTimeout" xml:space="preserve">
2832+
<value>No audio was received. Check that your microphone is connected and selected as the Windows input device, then try again.</value>
2833+
</data>
28312834
<data name="VoiceOverlayWindow_winexWindowEx_2.Title" xml:space="preserve">
28322835
<value>Companion Voice</value>
28332836
</data>

‎src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,9 @@ Utilisez l'une de ces options :
27812781
<data name="VoiceOverlayWindow_StatusErrorOccurred" xml:space="preserve">
27822782
<value>Une erreur s'est produite</value>
27832783
</data>
2784+
<data name="AudioPipeline_FirstAudioTimeout" xml:space="preserve">
2785+
<value>Aucun son n’a été reçu. Vérifiez que votre microphone est connecté et sélectionné comme périphérique d’entrée Windows, puis réessayez.</value>
2786+
</data>
27842787
<data name="VoiceOverlayWindow_winexWindowEx_2.Title" xml:space="preserve">
27852788
<value>Companion Voice</value>
27862789
</data>

‎src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,9 @@ Gebruik een van deze opties:
27822782
<data name="VoiceOverlayWindow_StatusErrorOccurred" xml:space="preserve">
27832783
<value>Er is een fout opgetreden</value>
27842784
</data>
2785+
<data name="AudioPipeline_FirstAudioTimeout" xml:space="preserve">
2786+
<value>Er is geen audio ontvangen. Controleer of uw microfoon is aangesloten en geselecteerd als Windows-invoerapparaat en probeer het opnieuw.</value>
2787+
</data>
27852788
<data name="VoiceOverlayWindow_winexWindowEx_2.Title" xml:space="preserve">
27862789
<value>Companion Voice</value>
27872790
</data>

‎src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,9 @@
27812781
<data name="VoiceOverlayWindow_StatusErrorOccurred" xml:space="preserve">
27822782
<value>发生错误</value>
27832783
</data>
2784+
<data name="AudioPipeline_FirstAudioTimeout" xml:space="preserve">
2785+
<value>未收到音频。请检查麦克风是否已连接并在 Windows 中选作输入设备,然后重试。</value>
2786+
</data>
27842787
<data name="VoiceOverlayWindow_winexWindowEx_2.Title" xml:space="preserve">
27852788
<value>Companion Voice</value>
27862789
</data>

‎src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,9 @@
27812781
<data name="VoiceOverlayWindow_StatusErrorOccurred" xml:space="preserve">
27822782
<value>發生錯誤</value>
27832783
</data>
2784+
<data name="AudioPipeline_FirstAudioTimeout" xml:space="preserve">
2785+
<value>未收到音訊。請確認麥克風已連線,並在 Windows 中選為輸入裝置,然後再試一次。</value>
2786+
</data>
27842787
<data name="VoiceOverlayWindow_winexWindowEx_2.Title" xml:space="preserve">
27852788
<value>Companion Voice</value>
27862789
</data>

‎tests/OpenClaw.Tray.Tests/SpeechInputContractTests.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ public void AudioPipeline_UsesManagedEnergyVad_NotNativeVad()
2525
Assert.Contains("energy >= stayThreshold", cs);
2626
}
2727

28+
[Fact]
29+
public void AudioPipeline_FirstAudioTimeout_UsesLocalizedActionableMessage()
30+
{
31+
var pipeline = Read("src", "OpenClaw.Tray.WinUI", "Services", "AudioPipeline.cs");
32+
var resources = Read("src", "OpenClaw.Tray.WinUI", "Strings", "en-us", "Resources.resw");
33+
34+
Assert.Contains("LocalizationHelper.GetString(\"AudioPipeline_FirstAudioTimeout\")", pipeline);
35+
Assert.Contains("Check that your microphone is connected and selected as the Windows input device", resources);
36+
}
37+
2838
[Fact]
2939
public void ChatVoiceDialogs_RouteDisabledSttCapabilityToPermissions_AndMissingModelToVoiceSettings()
3040
{

0 commit comments

Comments
 (0)