Skip to content

A TTS that fits in your CPU (and pocket)

Python

Add latencyHint when creating AudioContext (test frontend) (#124)

thataboy9878cd0fd217
diff --git a/.gitignore b/.gitignore
index b9e729a..3378dbd 100755
--- a/.gitignore
+++ b/.gitignore
@@ -85,4 +85,7 @@ profile_output*
# Agents files, use a symlink to AGENTS.md instead.
CLAUDE.md
QWEN.md
-.claude/
\ No newline at end of file
+.claude/
+voices
+
+italk.yaml
diff --git a/pocket_tts/static/index.html b/pocket_tts/static/index.html
index 6aa17ba..ab1eeda 100644
--- a/pocket_tts/static/index.html
+++ b/pocket_tts/static/index.html
@@ -111,7 +111,9 @@
<script>
class StreamingWavPlayer {
constructor() {
- this.audioContext = new (window.AudioContext || window.webkitAudioContext)();
+ this.audioContext = new (window.AudioContext || window.webkitAudioContext)(
+ { latencyHint: "playback" }
+ );
this.sampleRate = 0;
this.numChannels = 0;
this.headerParsed = false;