aboutsummaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py37
1 files changed, 35 insertions, 2 deletions
diff --git a/app.py b/app.py
index 2cf12f4..02a79ef 100644
--- a/app.py
+++ b/app.py
@@ -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>
"""
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage