QVAC-18966: tts-cpp — add missing <atomic> include in chatterbox_tts.cpp#27
Merged
GustavoA1604 merged 1 commit intoMay 20, 2026
Conversation
g_s3gen_cache_refcount (line ~189) is declared as
`static std::atomic<int>` and is later used with `.fetch_add()`,
`.fetch_sub()`, `.store()`, but the translation unit only pulls in
ggml/cstring/stl headers — never `<atomic>` directly. libstdc++
happens to expose `std::atomic` transitively via `<mutex>` on most
hosts so the build appears clean, but on the ggml-speech sync path
where header transitivity changes (the qvac-ext-ggml@speech merge
of ggml-org v0.10.2 cuts a few of those transitive paths) the
translation unit fails with:
chatterbox_tts.cpp:189: variable `std::atomic<int>
g_s3gen_cache_refcount' has initializer but incomplete type
Reproduces on the pre-merge speech HEAD too -- it was previously
hidden by header transitivity. Add `#include <atomic>` explicitly.
Verified by a clean rebuild of tts-cpp against an `-DBUILD_SHARED_LIBS=ON`
install of qvac-ext-ggml@speech HEAD (45dbdecd, day-2 ggml-speech).
Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced May 19, 2026
GustavoA1604
approved these changes
May 20, 2026
gianni-cor
pushed a commit
that referenced
this pull request
May 28, 2026
) Adds a small 'QVAC speech-stack ports' section between the upstream whisper.cpp intro media and the 'Quick start' section, pointing at the two in-tree subtrees this fork carries: - tts-cpp/ - Chatterbox (Turbo + Multilingual) + Supertonic TTS, in-tree subtree of github.com/gianni-cor/chatterbox.cpp. - parakeet-cpp/ - NVIDIA Parakeet FastConformer ASR + Sortformer diarization, in-tree subtree of the parakeet.cpp standalone repo. Both consume ggml through the `ggml-speech` vcpkg port (the qvac-ext-ggml/speech branch). Each subtree has its own README, build flow, and public C++ API; the upstream whisper.cpp build below the new section is unaffected. Closes review #27 ('one-line pointer to tts-cpp/ from the top-level qvac-ext-lib-whisper.cpp/README.md'). The reviewer specifically asked for tts-cpp; included parakeet-cpp at the same time so a future 'fix the un-fixed parakeet-cpp version of this bullet' commit doesn't need to revisit the same paragraph. Co-authored-by: Cursor <cursoragent@cursor.com>
gianni-cor
pushed a commit
that referenced
this pull request
May 28, 2026
…omic-include QVAC-18966: tts-cpp — add missing <atomic> include in chatterbox_tts.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-line fix.
tts-cpp/src/chatterbox_tts.cppdeclaresat line ~189 (and later uses
.fetch_add(),.fetch_sub(),.store()), but the translation unit never#include <atomic>directly. libstdc++ has historically exposedstd::atomictransitively via<mutex>so the build appears clean on most setups, but the transitive path is being trimmed in the ggml-speech v0.10.2 sync currently in flight ontetherto/qvac-ext-ggml#13. On the merged speech HEAD,chatterbox_tts.cppfails to compile with:The fault reproduces on the pre-merge
speechHEAD too if you trim a few headers — the include chain has just been hiding a latent bug.Add
#include <atomic>explicitly. No behavioural change; safe under any header transitivity.Tasks
chatterbox_tts.cppno longer relies on transitive<atomic>).Validation
Clean rebuild of
tts-cpp(master + this PR) against a shared-libs install oftetherto/qvac-ext-ggml#13HEAD45dbdecd(the day-2 v0.10.2 merge target):Notes
#include <atomic>line). Independent of every other PR in the QVAC-18991 / 18992 / 18993 series.QVAC-18993-bundled-ggml-android-dynamic-backendbranch where it was originally written; that combined branch will be closed in favour of this PR (single-concern) plus the QVAC-18993 ggml-bundled PR (the other two commits).Made with Cursor