Skip to content

[BUG] UI label trace missing for volume slider, thread safety issue, and SSML mode sync in tts_tab.py #18

Description

@Hahaha13561

How are you running Simpaudio?

Running from source (Python)

Which feature was affected?

Text-to-Speech (Piper)

What happened?

Bug Description

While reviewing and testing ui/tts_tab.py, a few minor UI and thread-safety bugs were identified:

  1. Volume Label Tracing: Unlike speed_var which has a trace_add callback updating self.speed_label, volume_var lacks a trace listener. As a result, moving the volume slider leaves the adjacent numerical text static (e.g., stuck at 1.0x).
  2. Thread Safety: self.status_callback is invoked directly from inside _generate_thread() (a background worker thread). Updating Tkinter UI elements directly from background threads can cause silent state corruption or application crashes on Windows.
  3. SSML Mode Synchronization: In _on_ssml_saved(), after inserting newly generated SSML markup into the text widget, self.ssml_mode is not automatically set to True, requiring manual checkbox activation by the user.

What did you expect to happen?

  • Volume label should update dynamically on slider drag.
  • UI status callbacks from threads should be scheduled via self.after().
  • SSML Mode checkbox should be checked automatically upon saving content from the SSML editor.

Operating system

Microsoft Windows 11 Version 25H2 (OS Build 26200.7840)

Steps to reproduce

  1. Move the Volume slider in the TTS tab and observe the label next to it.
  2. Generate speech and monitor status updates coming from the worker thread.
  3. Import text via the SSML editor and inspect the SSML Mode checkbox.

Checklist

  • I checked that a similar issue is not already reported

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions