Skip to content

Static Pop at the End of Sentences / Streaming Chunks #463

Closed

Description

@User873902

Recent update v0.3.0 appears to have introduced a harsh static pop at the end of sentences generated via the API. Rolling back to v0.2.4-master reverted the bug.

Branch: Stable
Deployment: Local, docker compose (cpu)
OS: Linux

Compose:

  wyoming_openai:
    image: ghcr.io/roryeckel/wyoming_openai:latest
    container_name: wyoming_openai
    ports:
      - "10300:10300"
    restart: unless-stopped
    environment:
      TTS_SPEED: 1.2
      TTS_OPENAI_URL: http://kokoro-fastapi-cpu:8880/v1
      TTS_MODELS: "kokoro"
      TTS_STREAMING_MODELS: "kokoro"
      TTS_BACKEND: "KOKORO_FASTAPI"
      TTS_VOICES: "af_bella(3)+af_nicole(1)"
      TTS_STREAMING_MIN_WORDS: "6"
      TTS_STREAMING_MAX_CHARS: "220"

  kokoro-fastapi-cpu:
    container_name: kokoro-fastapi-cpu
    restart: unless-stopped
    ports:
      - 8880:8880
    image: ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.4-master

Logs:

12:53:10 PM | INFO     | text_processor:151 | Starting smart split for 164 chars
12:53:10 PM | DEBUG    | text_processor:156 | Split raw text into 1 parts by pause tags.
12:53:10 PM | DEBUG    | text_processor:65 | Total processing took 0.51ms for chunk: 'On the other hand, the government is blaming the o...'
12:53:10 PM | INFO     | text_processor:299 | Yielding final chunk 1 for part: 'On the other hand, the government is blaming the o...' (162 tokens)
12:53:10 PM | DEBUG    | kokoro_v1:44 | Cached voice tensor from /tmp/af_bella(3)+af_nicole(1).pt
12:53:10 PM | DEBUG    | kokoro_v1:44 | Cached voice tensor from /tmp/af_bella(3)+af_nicole(1).pt
12:53:10 PM | DEBUG    | kokoro_v1:277 | Generating audio for text with lang_code 'a': 'Well, one of the biggest developments is that supporters of former president Evo Morales have joined...'
12:53:11 PM | DEBUG    | kokoro_v1:284 | Got audio chunk with shape: torch.Size([328800])
12:53:11 PM | DEBUG    | kokoro_v1:277 | Generating audio for text with lang_code 'a': 'On the other hand, the government is blaming the opposition and Morales' allies for the blockades, w...'
12:53:11 PM | DEBUG    | kokoro_v1:284 | Got audio chunk with shape: torch.Size([221400])
12:53:11 PM | INFO     | text_processor:323 | Split completed in 1881.56ms, produced 1 chunks (including pauses)
12:53:11 PM | DEBUG    | streaming_audio_writer:87 | Closed container, final page/trailer written.
12:53:11 PM | INFO     | text_processor:323 | Split completed in 1870.98ms, produced 1 chunks (including pauses)
12:53:11 PM | DEBUG    | streaming_audio_writer:87 | Closed container, final page/trailer written.

Logs:

INFO:__main__:Starting Wyoming OpenAI 0.4.4
WARNING:__main__:No ASR models specified
INFO:__main__:*** Streaming TTS Voices ***
TTS Voice Model:
  Name: af_bella(3)+af_nicole(1)
  Description: af_bella(3)+af_nicole(1)
  Model Name: kokoro
  Attribution: OpenAI-Compatible Wyoming Proxy - http://kokoro-fastapi-cpu:8880/v1
  Installed: Yes
  Languages: en
  Version: None
INFO:__main__:No Non-Streaming TTS voices specified
INFO:__main__:Starting server at tcp://0.0.0.0:10300
...
INFO:wyoming_openai.handler:Detected 1 ready sentences for immediate synthesis: ['Well, one of the biggest devel...']
INFO:wyoming_openai.handler:Processing final remaining text: 'On the other hand, the government is blaming the opposition and Morales' allies for the blockades, w...'
INFO:wyoming_openai.handler:Starting concurrent synthesis for 2 chunks
INFO:httpx:HTTP Request: POST http://kokoro-fastapi-cpu:8880/v1/audio/speech "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://kokoro-fastapi-cpu:8880/v1/audio/speech "HTTP/1.1 200 OK"
INFO:wyoming_openai.handler:Successfully completed concurrent streaming synthesis: Well, one of the biggest developments is that supporters of former president Evo Morales have joined...

Activity

  1. remsky commented on May 20, 2026

    @remsky
    Owner

    Hey @User873902, are you able to share details on format/parameters/streaming etc during the generation? Will try to repro and determine the cause; not hearing on my end on sample e.g

    stream.mp3
    oneshot.wav

  2. User873902 commented on May 21, 2026

    @User873902
    Author

    My apologizes. I added the applicable docker compose yaml. I"m unsure if it is mp3. When I was using v0.3.0, I did not find the errors when generating speech with the FastKoko webpage, but rather when the speech was generated with home assistant tts.speak. I wonder/think the static pop is at the end of a streaming chunk rather than every sentence end?

  3. changed the title [-]Static Pop at the End of Sentences[/-] [+]Static Pop at the End of Sentences / Streaming Chunks[/+] on May 21, 2026
  4. NikhilAlapati commented on May 24, 2026

    @NikhilAlapati

    My apologizes. I added the applicable docker compose yaml. I"m unsure if it is mp3. When I was using v0.3.0, I did not find the errors when generating speech with the FastKoko webpage, but rather when the speech was generated with home assistant tts.speak. I wonder/think the static pop is at the end of a streaming chunk rather than every sentence end?

    I'm having this issue with my HA TTS as well, the output files don't seem to have the static pop, however when using HA TTS there's a pop

  5. added a commit that references this issue on May 25, 2026
    7649d86
  6. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions