diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-11-01 12:18:12 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-11-01 12:18:16 -0700 |
| commit | 69b7b1cde8b144401c8eab05e6a80605c38f5952 (patch) | |
| tree | 6e17d7d3e4a94fc085626c42dfbdd6ca3321df98 /app.py | |
| parent | 29ff6ad6bcf6e7bfc9fece59a3bd849a786022a1 (diff) | |
add rnnoise for voice
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 37 |
1 files changed, 35 insertions, 2 deletions
@@ -342,7 +342,10 @@ PAGE_TEMPLATE = """ <section class="voice-topbar" id="voice-topbar" aria-label="Browser voice setup"> <div class="voice-topbar-bar"> <span class="voice-topbar-identity" id="voice-topbar-identity">[ not logged in ]</span> - <button type="button" class="voice-login-btn" id="voice-login-btn">browser connect</button> + <div class="voice-topbar-actions"> + <button type="button" class="btn-voice btn-voice-rnnoise voice-topbar-btn" id="voice-wasm-open-btn" aria-pressed="true" title="Open RNNoise WASM settings">rnnoise: on</button> + <button type="button" class="voice-login-btn" id="voice-login-btn">browser connect</button> + </div> </div> <p class="voice-topbar-hint" id="voice-message" role="status" aria-live="polite" hidden></p> </section> @@ -411,6 +414,36 @@ PAGE_TEMPLATE = """ </form> </dialog> +<dialog class="voice-dialog" id="voice-wasm-dialog" aria-labelledby="voice-wasm-dialog-title"> + <div class="voice-dialog-form"> + <header class="voice-dialog-header"> + <h2 id="voice-wasm-dialog-title">RNNoise WASM</h2> + <span class="voice-dialog-target voice-wasm-status" id="voice-wasm-status">not cached</span> + </header> + <div class="voice-dialog-body"> + <div class="voice-field"> + <span class="voice-field-tag">[ background noise suppression ]</span> + <p class="voice-wasm-desc">Filters microphone input through RNNoise (WebAssembly) before audio is sent to the voice gateway.</p> + <div class="voice-wasm-controls"> + <button type="button" class="btn-voice btn-voice-rnnoise" id="voice-rnnoise-toggle" aria-pressed="true">rnnoise: on</button> + </div> + <p class="voice-wasm-desc">Processing: <span class="voice-wasm-status" id="voice-wasm-active" data-state="idle">not in a call</span></p> + </div> + <div class="voice-field"> + <span class="voice-field-tag">[ wasm model cache ]</span> + <div class="voice-wasm-controls"> + <button type="button" class="btn-voice" id="voice-wasm-redownload">re-download</button> + <button type="button" class="btn-voice btn-voice-danger" id="voice-wasm-delete">delete</button> + </div> + </div> + <p class="voice-dialog-message" id="voice-wasm-message" role="status" aria-live="polite" hidden></p> + </div> + <footer class="voice-dialog-actions"> + <button type="button" class="btn-voice" id="voice-wasm-close">close</button> + </footer> + </div> +</dialog> + <section class="voice-bar" id="voice-bar" aria-label="Voice controls" hidden> <div class="voice-meter" aria-hidden="true"> <div class="voice-meter-fill" id="voice-meter"></div> @@ -505,7 +538,7 @@ PAGE_TEMPLATE = """ }); {% endif %} </script> -{% if voice_available %}<script src="/static/voice.js" defer></script>{% endif %} +{% if voice_available %}<script src="/static/voice.js?v=rnnoise-2" defer></script>{% endif %} </body> </html> """ |
