Welcome to Assisted Intel

Assisted Intel is your go-to resource for understanding and utilizing AI effectively. Whether you're just starting or looking to deepen your knowledge, we are here to guide you every step of the way.

pexels-photo-30820142

How I Replaced a Dead Talking-Avatar Pipeline With a Local Flask TTS Server

How I Replaced a Dead Talking-Avatar Pipeline With a Local Flask TTS Server

I used to have a working talking sprite.

A DAZ character exported into iClone. Fifteen mouth shapes. D-Talks syncing those frames to Windows speech. It was a 2D sprite built from a 3D object. Basic. Fine for live streaming. Highlight text in the browser, send it through a Chrome or Brave extension, and Anna said it instead of me.

Then the delay showed up.

The extension posted text to a local Flask server. The server wrote a WAV. A watch folder picked the file up. The avatar loaded it and started talking. By the time her mouth moved, the moment was gone. I sat there watching it animate the whole clip after the fact and thought: this is not live. This is a render farm with extra steps.

D-Talks is one of those tools that worked, then quietly became the thing you used to use. That is the pattern I keep hitting. Software reaches end of life. The character files are still there. The mouth shapes are still there. The middle of the pipeline is dead. AI is actually useful here — not as a replacement personality, as a way to rebuild the missing middle of a workflow you already paid for.

Machine Learning for Absolute Beginners by Oliver Theobald
Machine Learning for Absolute Beginners (3rd Edition)
Plain-English intro if you are wiring Flask and voices and want the actual ML vocabulary without a textbook hangover.

So I stopped asking the server to write audio for the avatar and asked it to speak.

The old pipeline, and why it felt late

The original path looked like this:

  1. Highlight text in Chrome or Brave.
  2. The Avatar Read extension posts it to a local Python server.
  3. The server generates a WAV from system text to speech.
  4. A watch folder hands that file to the talking sprite.
  5. D-Talks / the avatar plays it.

Each hop was reasonable on its own. Together they were too slow for live use. The bottleneck was never the mouth shapes. It was waiting on a file.

What I asked Grok to change

I uploaded the old listener as a zip and said, in one shot:

  • Keep the existing browser extension. Do not break POST /speak.
  • Stop writing a WAV for this path.
  • Use the Windows voices already on the machine.
  • Let me pick the voice in the Web UI.
  • Add a stop button so I can kill speech mid-sentence.
  • If I highlight a second paragraph while the first is still going, queue it. Finish the first, then do the second.
  • One speaker at a time.

I also told it not to do this in CLI coding agents. Those chew tokens. A normal chat — whole program in, zip back out — is cheaper, and I can argue with it. That is the vibe-coding part. Not magic. Dump the project, state the behavior, get the Flask app and the HTML template back together so I do not have to ping-pong files.

AI Prompt Engineering Bible by Tomasz Dylik
AI Prompt Engineering Bible (7 Books in 1)
If the “tell the model exactly what to change” step is the part you keep rewriting, this is the prompt-side companion to that zip-in, zip-out workflow.

Windows only for now. Cross-platform later. I already know I will regret saying that out loud.

What Avatar Read Server does now

The finished helper is on GitHub: https://github.com/Assisted-Intel/Avatar-Read-Server

If you only read this post and never watch the video, this is the behavior that matters:

  • Same Chrome / Brave extension. Highlight text, click Avatar Read, it hits 127.0.0.1:8765/speak.
  • The page stays loaded. No form-post reload.
  • Incoming text goes into a queue. New highlights wait their turn. They do not yank the current sentence.
  • Stop speech (or Esc) dumps the line that is playing and the rest of the queue.
  • Voice, rate, and volume live in the Web UI. You can preview a voice before you commit.
  • Windows SAPI is the “just talk” path. No WAV written for that mode.
  • The UI shows the current text so you can see what it thinks it is saying.

The repo grew past the video. There is also F5-TTS, hold-to-talk dictation on a local NVIDIA GPU, a desktop overlay, an OBS browser source, and an optional talking avatar that can import a D-Talks Cuts folder. If you only wanted the original “read this paragraph now” behavior, SAPI plus the queue is still the path. A GPU is optional for that.

How it fits next to Local Streaming Token

This is not meant to stay a standalone toy. It sits next to Local Streaming Token, a local-first chat and RAG workbench that already talks to Ollama on the machine.

Avatar Read Server already has a listen endpoint for that stack: record until silence, transcribe, hand the text back. The plan after that is native streaming tokens into the same mouth, then a version that can sit on Grok, Claude, or a local model as a simple chat avatar.

One speaker. One queue. Stop when you are done hearing it.

Run it on Windows

Requirements in short:

  • Windows 10 or 11
  • Python 3.11
  • Optional NVIDIA GPU if you want dictation or F5-TTS

Clone the repo, run setup.bat, run download-models.bat only if you want F5 or Parakeet, then run.bat. The Flask UI opens at http://127.0.0.1:8765. Point the extension at host 127.0.0.1, port 8765, path /speak.

Why this is the useful part of “AI wrote my app”

I still want the sprite. That part is not dead. I just refused to keep generating files so a watch folder could pretend we were live.

If your stack is an old character tool plus a local Python server plus a browser extension, you do not have to throw the character away. Make the server talk first. Put the face back on later. End-of-life software is annoying. A small Flask TTS server with a queue and a stop button is a boring fix, which is usually the right kind.

Repos

Share with