You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using audiocpp_server with breeze, serving an llm using llama-server, and using huggingface's speech-to-speech for an all speech chatbot. It works fine on my M1 Mac, except that every time audio is generated, I guess a random seed is chosen because the voice is not consistent (although it does seem to follow the voice style instructions). OTOH, if I try to run the server with a reference voice, which works fine in the webui, it is ignored. Are there workarounds for these two issues?
@scalar27 I tested this directly with curl on Metal with the config below. Repeated identical requests produced identical WAVs, and requests with different text correctly used the configured reference audio. Please try a named reference preset in the server config and make sure the request’s voice matches that preset name. An unmatched voice overrides the default preset, which can cause the reference to be ignored.
@scalar27 I actually ran into the same issue with instruction-only voice generation. Official Python keeps one continuous generation context, while audio.cpp splits long text into independently generated chunks. Each chunk can therefore produce a different voice. Keeping the seed fixed alone won’t guarantee consistency because the text changes and the previous speech context isn’t carried over. A current workaround is to increase text_chunk_size.
I decided to implement this solution, and a PR will follow. For longform voice design, the first chunk’s generated audio codes and text serve as a fixed voice reference for the remaining chunks. Before the fix, Nemotron diarization detected eight speaker labels across 13 text chunks in a 384-second recording, reaching its eight-speaker limit. After the fix, it detected just one speaker.
Using the voice_ref does work well, thanks. It's a bit strange that I am now getting a brief audio glitch at the start of each generation since you said you made an optimization. (Or was I supposed to change text_chunk_size in server.config?) Also, would you please give an example of the .json part to define the voice via instruction instead of a voice_ref? I can't seem to get that to work.
@scalar27 Could you share your config/cmd/logs and output? Also please try 2 seeds and see if the issue is consistent. The optimization was on the streaming path and voice instruction path. Offline and voice clone should be unaffected.
Note that the audio glitches do (almost completely) go away if I set --playback-buffer-ms 1200 in s2s, but then there is a noticeable delay before the audio begins.
Hi @scalar27 I can’t reproduce the issue on an M4 using your server configuration. However, since increasing --playback-buffer-ms to 1200 almost eliminates the glitch, the M1 may not generate subsequent audio chunks quickly enough to keep the 300 ms playback buffer filled. Could you keep --playback-buffer-ms 300 and add "stream_chunk_policy": "fixed" to default_request_options, and check whether the glitch disappears?
Activity
0xShug0 commentedon Oct 10, 2026
@scalar27 I tested this directly with curl on Metal with the config below. Repeated identical requests produced identical WAVs, and requests with different text correctly used the configured reference audio. Please try a named reference preset in the server config and make sure the request’s voice matches that preset name. An unmatched voice overrides the default preset, which can cause the reference to be ignored.
0xShug0 commentedon Oct 10, 2026
@scalar27 I actually ran into the same issue with instruction-only voice generation. Official Python keeps one continuous generation context, while audio.cpp splits long text into independently generated chunks. Each chunk can therefore produce a different voice. Keeping the seed fixed alone won’t guarantee consistency because the text changes and the previous speech context isn’t carried over. A current workaround is to increase
text_chunk_size.0xShug0 commentedon Oct 10, 2026
I decided to implement this solution, and a PR will follow. For longform voice design, the first chunk’s generated audio codes and text serve as a fixed voice reference for the remaining chunks. Before the fix, Nemotron diarization detected eight speaker labels across 13 text chunks in a 384-second recording, reaching its eight-speaker limit. After the fix, it detected just one speaker.
scalar27 commentedon Oct 10, 2026
I look forward to trying this, thanks!
0xShug0 commentedon Oct 10, 2026
Merged. Also optimized the Breeze TTS streaming path. TTFA dropped from approximately 1,000 ms to 100 ms in my tests on M4, 200+ms to 30 ms on CUDA.
scalar27 commentedon Oct 11, 2026
Using the voice_ref does work well, thanks. It's a bit strange that I am now getting a brief audio glitch at the start of each generation since you said you made an optimization. (Or was I supposed to change text_chunk_size in server.config?) Also, would you please give an example of the .json part to define the voice via instruction instead of a voice_ref? I can't seem to get that to work.
0xShug0 commentedon Oct 11, 2026
@scalar27 Could you share your config/cmd/logs and output? Also please try 2 seeds and see if the issue is consistent. The optimization was on the streaming path and voice instruction path. Offline and voice clone should be unaffected.
0xShug0 commentedon Oct 11, 2026
@scalar27 Any updates? I can't reproduce the issue on my end, so I'd like to try your test case and fix the issue before the next release. Thanks!
scalar27 commentedon Oct 12, 2026
Here is my server.json:
{
"host": "127.0.0.1",
"port": 8091,
"backend": "metal",
"threads": 8,
"lazy_load": true,
"models": [
{
"id": "breeze-tts",
"family": "breeze_tts",
"path": "models/Breeze-TTS-2-GGUF/breeze-tts-2-q8_0.gguf",
"task": "tts",
"mode": "streaming",
"default_request_options": {
"seed": 12345
},
"voice_presets": {
"assistant": {
"voice_ref": "assets/resources/a.wav",
"reference_text": "This little work was finished in the year 1803. And intended for immediate publication."
}
},
"default_voice_preset": "assistant"
}
]
}
scalar27 commentedon Oct 12, 2026
And here is the speech-to-speech (I'm using v 1.0.0) command:
speech-to-speech local
--stt parakeet-tdt
--llm_backend responses-api
--model_name localllm
--responses_api_base_url http://127.0.0.1:8080/v1
--responses_api_api_key ""
--tts openai
--openai_tts_base_url http://127.0.0.1:8091/v1
--openai_tts_model breeze-tts
--openai_tts_response_format pcm
--openai_tts_sample_rate 24000
--openai_tts_stream true
--playback-buffer-ms 300
--openai_tts_voice assistant
scalar27 commentedon Oct 12, 2026
I run audio.cpp with:
./build/macos-metal-release/bin/audiocpp_server --config server.json
I'm serving the llm using llama-server:
../../llama.cpp/build/bin/llama-server --model myllmmodel.gguf --alias localllm --ctx-size 8192 --host 127.0.0.1 --port 8080 --temp 1.0
scalar27 commentedon Oct 12, 2026
Here is some initial audiocpp_server output as I start chatting:
./build/macos-metal-release/bin/audiocpp_server --config server.json
audio.cpp is optimized for CUDA. The metal server backend is intended for portability and testing, but performance and model coverage may be lower than CUDA.
audiocpp_server listening on http://127.0.0.1:8091
ggml_metal_device_init: tensor API disabled for pre-M5 and pre-A19 devices
ggml_metal_library_init: using embedded metal library
ggml_metal_library_init: loaded in 0.012 sec
ggml_metal_rsets_init: creating a residency set collection (keep_alive = 180 s)
ggml_metal_device_init: GPU name: MTL0 (Apple M1 Max)
ggml_metal_device_init: GPU family: MTLGPUFamilyApple7 (1007)
ggml_metal_device_init: GPU family: MTLGPUFamilyCommon3 (3003)
ggml_metal_device_init: GPU family: MTLGPUFamilyMetal3 (5001)
ggml_metal_device_init: simdgroup reduction = true
ggml_metal_device_init: simdgroup matrix mul. = true
ggml_metal_device_init: has unified memory = true
ggml_metal_device_init: has bfloat = true
ggml_metal_device_init: has tensor = false
ggml_metal_device_init: use residency sets = true
ggml_metal_device_init: use shared buffers = true
ggml_metal_device_init: recommendedMaxWorkingSetSize = 51539.61 MB
ggml_metal_init: allocating
ggml_metal_init: found device: Apple M1 Max
ggml_metal_init: picking default device: Apple M1 Max
ggml_metal_init: use fusion = true
ggml_metal_init: use concurrency = true
ggml_metal_init: use graph optimize = true
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_f32_f32', name = 'kernel_cpy_f32_f32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_f32_f32 0x140e0baa0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_transpose_f32', name = 'kernel_cpy_transpose_f32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_transpose_f32 0x140e0c5f0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_contig_f32_f32', name = 'kernel_cpy_contig_f32_f32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_contig_f32_f32 0x140e0cba0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32', name = 'kernel_unary_f32_f32_op=10_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_op=10_cnt=1 0x140e0d0b0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_repeat_f32', name = 'kernel_repeat_f32'
ggml_metal_library_compile_pipeline: loaded kernel_repeat_f32 0x140e0d520 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_concat', name = 'kernel_concat'
ggml_metal_library_compile_pipeline: loaded kernel_concat 0x140e0dd40 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_short', name = 'kernel_mul_mv_f32_f32_short_nsg=1_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_short_nsg=1_ne12=1_r2=1_r3=1 0x140e0e400 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32_4', name = 'kernel_bin_fuse_f32_f32_f32_4_op=0_nf=1_rb=0_cb=0'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_4_op=0_nf=1_rb=0_cb=0 0x140e0ebc0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=107_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=107_cnt=0 0x140e0f2f0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_row_f32', name = 'kernel_cpy_row_f32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_row_f32 0x140e0e810 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_f32_f32', name = 'kernel_mul_mm_f32_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_f32_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1 0x140e11c90 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_acc_f32_f32', name = 'kernel_mul_mm_acc_f32_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_acc_f32_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1 0x130e05a50 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_4', name = 'kernel_mul_mv_f32_f32_4_nsg=1_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_4_nsg=1_ne12=1_r2=1_r3=1 0x130e065a0 | th_max = 768 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_im2col_f32', name = 'kernel_im2col_f32'
ggml_metal_library_compile_pipeline: loaded kernel_im2col_f32 0x130e05e10 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32', name = 'kernel_bin_fuse_f32_f32_f32_op=0_nf=1_rb=0_cb=0'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_op=0_nf=1_rb=0_cb=0 0x130e08150 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32', name = 'kernel_unary_f32_f32_op=107_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_op=107_cnt=0 0x130e085d0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_norm_mul_add_f32_4', name = 'kernel_norm_mul_add_f32_4'
ggml_metal_library_compile_pipeline: loaded kernel_norm_mul_add_f32_4 0x140e12480 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_q8_0_f32', name = 'kernel_mul_mm_q8_0_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_q8_0_f32_bci=0_bco=1_ne12=1_ne13=1_r2=1_r3=1 0x140e12de0 | th_max = 896 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_rope_neox_f32', name = 'kernel_rope_neox_f32_imrope=0'
ggml_metal_library_compile_pipeline: loaded kernel_rope_neox_f32_imrope=0 0x140e13160 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_pad', name = 'kernel_flash_attn_ext_pad_mask=1_ncpsg=64'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_pad_mask=1_ncpsg=64 0x140e13b70 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_blk', name = 'kernel_flash_attn_ext_blk_nqptg=8_ncpsg=64'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_blk_nqptg=8_ncpsg=64 0x140e14260 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_f32_dk64_dv64', name = 'kernel_flash_attn_ext_f32_dk64_dv64_mask=1_sinks=0_bias=0_scap=0_kvpad=1_bcm=1_ns10=64_ns20=64_nsg=4'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_f32_dk64_dv64_mask=1_sinks=0_bias=0_scap=0_kvpad=1_bcm=1_ns10=64_ns20=64_nsg=4 0x140e148b0 | th_max = 768 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32_4', name = 'kernel_bin_fuse_f32_f32_f32_4_op=2_nf=1_rb=0_cb=0'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_4_op=2_nf=1_rb=0_cb=0 0x140e14c70 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=104_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=104_cnt=0 0x140e15050 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_get_rows_f16', name = 'kernel_get_rows_f16'
ggml_metal_library_compile_pipeline: loaded kernel_get_rows_f16 0x140e16910 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=10_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=10_cnt=1 0x140e175e0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_rms_norm_f32_4', name = 'kernel_rms_norm_f32_4'
ggml_metal_library_compile_pipeline: loaded kernel_rms_norm_f32_4 0x140e17020 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32_4', name = 'kernel_bin_fuse_f32_f32_f32_4_op=2_nf=1_rb=1_cb=0'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_4_op=2_nf=1_rb=1_cb=0 0x140e17ef0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_f32_f32', name = 'kernel_mul_mm_f32_f32_bci=0_bco=1_ne12=4_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_f32_f32_bci=0_bco=1_ne12=4_ne13=1_r2=1_r3=1 0x140e18270 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_soft_max_f32', name = 'kernel_soft_max_f32'
ggml_metal_library_compile_pipeline: loaded kernel_soft_max_f32 0x140e184d0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_short', name = 'kernel_mul_mv_f32_f32_short_nsg=1_ne12=4_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_short_nsg=1_ne12=4_r2=1_r3=1 0x140e18bc0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=103_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=103_cnt=0 0x140e190b0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_rms_norm_mul_f32_4', name = 'kernel_rms_norm_mul_f32_4'
ggml_metal_library_compile_pipeline: loaded kernel_rms_norm_mul_f32_4 0x140e25970 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_f32_f16', name = 'kernel_cpy_f32_f16'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_f32_f16 0x140e25f20 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_contig_f32_f16', name = 'kernel_cpy_contig_f32_f16'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_contig_f32_f16 0x140e264d0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_f32_dk128_dv128', name = 'kernel_flash_attn_ext_f32_dk128_dv128_mask=1_sinks=0_bias=0_scap=0_kvpad=1_bcm=1_ns10=1024_ns20=1024_nsg=4'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_f32_dk128_dv128_mask=1_sinks=0_bias=0_scap=0_kvpad=1_bcm=1_ns10=1024_ns20=1024_nsg=4 0x140e26b90 | th_max = 576 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_swiglu_f32', name = 'kernel_swiglu_f32'
ggml_metal_library_compile_pipeline: loaded kernel_swiglu_f32 0x140e268e0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_q8_0_f32', name = 'kernel_mul_mv_q8_0_f32_nsg=4_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_q8_0_f32_nsg=4_ne12=1_r2=1_r3=1 0x140e27c00 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_get_rows_f32', name = 'kernel_get_rows_f32'
ggml_metal_library_compile_pipeline: loaded kernel_get_rows_f32 0x140e27580 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_4', name = 'kernel_mul_mv_f32_f32_4_nsg=4_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_4_nsg=4_ne12=1_r2=1_r3=1 0x140e28390 | th_max = 768 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_ext_q8_0_f32_r1_2', name = 'kernel_mul_mv_ext_q8_0_f32_r1_2_nsg=2_nxpsg=16_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_ext_q8_0_f32_r1_2_nsg=2_nxpsg=16_ne12=1_r2=1_r3=1 0x140e28c90 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_pad', name = 'kernel_flash_attn_ext_pad_mask=1_ncpsg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_pad_mask=1_ncpsg=32 0x140e28ef0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_f32_dk128_dv128', name = 'kernel_flash_attn_ext_vec_f32_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=256_ns20=256_nsg=1_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_f32_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=256_ns20=256_nsg=1_nwg=32 0x140e29290 | th_max = 448 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_reduce', name = 'kernel_flash_attn_ext_vec_reduce_dv=128_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_reduce_dv=128_nwg=32 0x140e29a10 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_ext_f32_f32_r1_2', name = 'kernel_mul_mv_ext_f32_f32_r1_2_nsg=2_nxpsg=16_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_ext_f32_f32_r1_2_nsg=2_nxpsg=16_ne12=1_r2=1_r3=1 0x140e2a710 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_set_rows_f16_i32', name = 'kernel_set_rows_f16_i32'
ggml_metal_library_compile_pipeline: loaded kernel_set_rows_f16_i32 0x140e2aa60 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_f16_dk128_dv128', name = 'kernel_flash_attn_ext_vec_f16_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=256_ns20=256_nsg=1_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_f16_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=256_ns20=256_nsg=1_nwg=32 0x140e2b120 | th_max = 448 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32_4', name = 'kernel_bin_fuse_f32_f32_f32_4_op=0_nf=1_rb=1_cb=0'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_4_op=0_nf=1_rb=1_cb=0 0x140e2bab0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_4', name = 'kernel_mul_mv_f32_f32_4_nsg=2_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_4_nsg=2_ne12=1_r2=1_r3=1 0x140e2c5b0 | th_max = 768 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_i32_i32', name = 'kernel_cpy_i32_i32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_i32_i32 0x140e2c810 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_cpy_contig_i32_i32', name = 'kernel_cpy_contig_i32_i32'
ggml_metal_library_compile_pipeline: loaded kernel_cpy_contig_i32_i32 0x140e2cd70 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_pad_left_f32', name = 'kernel_pad_left_f32'
ggml_metal_library_compile_pipeline: loaded kernel_pad_left_f32 0x140e2d2d0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_f32_dk64_dv64', name = 'kernel_flash_attn_ext_vec_f32_dk64_dv64_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=1024_ns20=1024_nsg=1_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_f32_dk64_dv64_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=1024_ns20=1024_nsg=1_nwg=32 0x140e2da30 | th_max = 448 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_reduce', name = 'kernel_flash_attn_ext_vec_reduce_dv=64_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_reduce_dv=64_nwg=32 0x140e2e1c0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=106_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=106_cnt=1 0x140e2e540 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_col2im_1d_f32', name = 'kernel_col2im_1d_f32'
ggml_metal_library_compile_pipeline: loaded kernel_col2im_1d_f32 0x140e2e7a0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32', name = 'kernel_bin_fuse_f32_f32_f32_op=0_nf=1_rb=0_cb=1'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_op=0_nf=1_rb=0_cb=1 0x140e2edd0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_f32_f32_short', name = 'kernel_mul_mv_f32_f32_short_nsg=1_ne12=1024_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_f32_f32_short_nsg=1_ne12=1024_r2=1_r3=1 0x140e2f030 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=104_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=104_cnt=1 0x140e2f290 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_ext_q8_0_f32_r1_4', name = 'kernel_mul_mv_ext_q8_0_f32_r1_4_nsg=2_nxpsg=8_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_ext_q8_0_f32_r1_4_nsg=2_nxpsg=8_ne12=1_r2=1_r3=1 0x140e2f6a0 | th_max = 640 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mv_ext_f32_f32_r1_4', name = 'kernel_mul_mv_ext_f32_f32_r1_4_nsg=2_nxpsg=8_ne12=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mv_ext_f32_f32_r1_4_nsg=2_nxpsg=8_ne12=1_r2=1_r3=1 0x140e30380 | th_max = 640 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_bin_fuse_f32_f32_f32', name = 'kernel_bin_fuse_f32_f32_f32_op=2_nf=1_rb=0_cb=1'
ggml_metal_library_compile_pipeline: loaded kernel_bin_fuse_f32_f32_f32_op=2_nf=1_rb=0_cb=1 0x140e30870 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=15_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=15_cnt=1 0x140e30ad0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=13_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=13_cnt=1 0x140e30ff0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_f32_f32', name = 'kernel_mul_mm_f32_f32_bci=0_bco=0_ne12=1_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_f32_f32_bci=0_bco=0_ne12=1_ne13=1_r2=1_r3=1 0x130e08b40 | th_max = 896 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_pad_f32', name = 'kernel_pad_f32'
ggml_metal_library_compile_pipeline: loaded kernel_pad_f32 0x130e09320 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=15_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=15_cnt=0 0x130e09830 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=13_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=13_cnt=0 0x130e0a040 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_mul_mm_acc_f32_f32', name = 'kernel_mul_mm_acc_f32_f32_bci=0_bco=0_ne12=1_ne13=1_r2=1_r3=1'
ggml_metal_library_compile_pipeline: loaded kernel_mul_mm_acc_f32_f32_bci=0_bco=0_ne12=1_ne13=1_r2=1_r3=1 0x130e09a90 | th_max = 832 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=12_cnt=1'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=12_cnt=1 0x130e0a3c0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_flash_attn_ext_vec_f16_dk128_dv128', name = 'kernel_flash_attn_ext_vec_f16_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=1024_ns20=1024_nsg=1_nwg=32'
ggml_metal_library_compile_pipeline: loaded kernel_flash_attn_ext_vec_f16_dk128_dv128_mask=1_sink=0_bias=0_scap=0_kvpad=1_ns10=1024_ns20=1024_nsg=1_nwg=32 0x140e2c260 | th_max = 448 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=106_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=106_cnt=0 0x140e31ff0 | th_max = 1024 | th_width = 32
ggml_metal_library_compile_pipeline: compiling pipeline: base = 'kernel_unary_f32_f32_4', name = 'kernel_unary_f32_f32_4_op=12_cnt=0'
ggml_metal_library_compile_pipeline: loaded kernel_unary_f32_f32_4_op=12_cnt=0 0x140e32250 | th_max = 1024 | th_width = 32
scalar27 commentedon Oct 12, 2026
and here is the initial speech-to-speech output, in case this is useful:
DeepFilterNet not available for audio enhancement: No module named 'df'
2026-10-11 20:46:38,525 - speech_to_speech.s2s_pipeline - WARNING - For macOS users, it is recommended to use mlx-lm. You can activate it by passing --llm_backend mlx-lm.
2026-10-11 20:46:38,525 - speech_to_speech.s2s_pipeline - WARNING - For macOS users, it is recommended to use qwen3 for TTS (pocket, kokoro, and omnivoice are also valid options).
2026-10-11 20:46:39,263 - httpx2 - INFO - HTTP Request: HEAD https://huggingface.co/pipecat-ai/smart-turn-v3/resolve/main/smart-turn-v3.2-cpu.onnx "HTTP/1.1 302 Found"
2026-10-11 20:46:39,306 - speech_to_speech.VAD.smart_turn - INFO - Loaded Smart Turn v3.2 from /Users/myname/.cache/huggingface/hub/models--pipecat-ai--smart-turn-v3/snapshots/f766f81d3cfdf7737ac64aad813d91bbfd56bf93/smart-turn-v3.2-cpu.onnx using CPUExecutionProvider (threshold=0.50)
Using cache found in /Users/myname/.cache/torch/hub/snakers4_silero-vad_master
2026-10-11 20:46:39,845 - speech_to_speech.STT.parakeet_tdt_handler - INFO - Loading Parakeet TDT model: mlx-community/parakeet-tdt-0.6b-v3 on mps
2026-10-11 20:46:40,862 - httpx2 - INFO - HTTP Request: GET https://huggingface.co/api/models/mlx-community/parakeet-tdt-0.6b-v3/revision/main "HTTP/1.1 200 OK"
Fetching 4 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 2702.52it/s]
Reconstruction complete: | | 0.00B / 0.00B
Download complete: | 0.00B
2026-10-11 20:46:41,073 - speech_to_speech.STT.parakeet_tdt_handler - INFO - MLX Audio Parakeet model loaded successfully
2026-10-11 20:46:41,073 - speech_to_speech.STT.parakeet_tdt_handler - INFO - Live transcription enabled for Parakeet TDT (mlx)
2026-10-11 20:46:41,073 - speech_to_speech.STT.parakeet_tdt_handler - INFO - Warming up ParakeetTDTSTTHandler
2026-10-11 20:46:41,171 - speech_to_speech.STT.parakeet_tdt_handler - INFO - Model warmed up and ready
2026-10-11 20:46:41,203 - speech_to_speech.LLM.responses_api_language_model - INFO - Warming up ResponsesApiModelHandler
2026-10-11 20:46:41,638 - httpx - INFO - HTTP Request: POST http://127.0.0.1:8080/v1/responses "HTTP/1.1 200 OK"
2026-10-11 20:46:41,661 - speech_to_speech.LLM.responses_api_language_model - INFO - ResponsesApiModelHandler: warmed up! time: 0.459 s
2026-10-11 20:46:41,662 - speech_to_speech.TTS.openai_compatible_handler - INFO - Warming up OpenAICompatibleTTSHandler
2026-10-11 20:46:41,674 - httpx - INFO - HTTP Request: POST http://127.0.0.1:8091/v1/audio/speech "HTTP/1.1 200 OK"
2026-10-11 20:46:49,120 - speech_to_speech.TTS.openai_compatible_handler - INFO - OpenAICompatibleTTSHandler warmed up in 7.458s
2026-10-11 20:46:49,143 - speech_to_speech.api.openai_realtime.server - INFO - OpenAI Realtime API starting on ws://127.0.0.1:8765/v1/realtime (pool size 1)
INFO: Started server process [49992]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8765 (Press CTRL+C to quit)
INFO: 127.0.0.1:54922 - "WebSocket /v1/realtime?model=local" [accepted]
INFO: connection open
2026-10-11 20:46:49,259 - [pipeline 0] speech_to_speech.api.openai_realtime.websocket_router - INFO - Client connected to pipeline 0 (session session_a38078454fca4175bf09efdaeff4c03f)
Connected.
EVENT: session.updated
2026-10-11 20:46:53,023 - [pipeline 0] speech_to_speech.VAD.vad_handler - INFO - Speech started (confirmed, active=384ms, min=384ms, segment=384ms, turn=turn_1 rev=0)
USER: What it would tell me about your2026-10-11 20:46:54,035 - [pipeline 0] speech_to_speech.VAD.vad_handler - INFO - Speech soft-ended (segment=1876ms, active=1280ms, turn=turn_1 rev=0)
2026-10-11 20:46:54,097 - [pipeline 0] speech_to_speech.VAD.vad_handler - INFO - Smart Turn: complete (p=0.967, 62.1ms); using 800ms speculative reopen grace
2026-10-11 20:46:54,097 - [pipeline 0] speech_to_speech.STT.parakeet_tdt_handler - INFO - Parakeet final STT start turn=turn_1 rev=0 audio=1.876s age=0.000s
2026-10-11 20:46:54,155 - [pipeline 0] speech_to_speech.STT.parakeet_tdt_handler - INFO - Parakeet final STT done turn=turn_1 rev=0 total=0.058s lock_scope=0.057s inference=0.057s chars=28
USER: Well tell me about yourself.
Language: en-auto
2026-10-11 20:46:54,159 - [pipeline 0] speech_to_speech.baseHandler - INFO - ParakeetTDTSTTHandler: 0.061 s
2026-10-11 20:46:54,159 - [pipeline 0] speech_to_speech.STT.transcription_notifier - INFO - Transcription completed (language=en-auto): chars=28
2026-10-11 20:46:54,181 - [pipeline 0] httpx - INFO - HTTP Request: POST http://127.0.0.1:8080/v1/responses "HTTP/1.1 200 OK"
2026-10-11 20:46:54,901 - [pipeline 0] speech_to_speech.baseHandler - INFO - ResponsesApiModelHandler: 0.734 s
2026-10-11 20:46:54,901 - [pipeline 0] speech_to_speech.LLM.base_openai_compatible_language_model - INFO - Tools: chars=2
EVENT: input_audio_buffer.committed
EVENT: conversation.item.created
USER: Well tell me about yourself.
ASSISTANT:
EVENT: response.content_part.added
ASSISTANT: I am a friendly assistant here to help you with whatever you need!2026-10-11 20:46:55,265 - httpx - INFO - HTTP Request: POST http://127.0.0.1:8091/v1/audio/speech "HTTP/1.1 200 OK"
2026-10-11 20:46:55,528 - [pipeline 0] speech_to_speech.TTS.openai_compatible_handler - INFO - OpenAI-compatible TTS time to first audio: 0.272s
2026-10-11 20:46:55,528 - [pipeline 0] speech_to_speech.TTS.openai_compatible_handler - INFO - Last speech detected to first speech out: 1.590s (turn=turn_1 rev=0)
2026-10-11 20:46:59,511 - [pipeline 0] speech_to_speech.api.openai_realtime.service - INFO - Token usage (response): input=384, output=15
2026-10-11 20:46:59,515 - [pipeline 0] speech_to_speech.api.openai_realtime.handlers.response - INFO - Turn turn_1 rev=0 latency: stt=0.06s llm=0.73s tts_ttfa=0.27s e2e=1.59s vad_decision=0.10s hold=0.34s smart_turn_status=complete status=completed mlx_lock_wait=0.00s[ParakeetSTT-Progressive:0.00sx2,ParakeetSTT-Final:0.00s] mlx_lock_hold=0.26s[ParakeetSTT-Progressive:0.20sx2,ParakeetSTT-Final:0.06s] response_key=fb3b3f5b31b3405a8d2605ec9a82cece
2026-10-11 20:46:59,515 - [pipeline 0] speech_to_speech.api.openai_realtime.handlers.response - INFO - Response done (status=completed) — this response: input_tokens=384, output_tokens=15, audio=1.88s | cumulative: input_tokens=384, output_tokens=15, audio=1.88s
ASSISTANT:
EVENT: response.content_part.done
2026-10-11 20:46:59,518 - [pipeline 0] speech_to_speech.api.openai_realtime.websocket_router - INFO - Pipeline 0: response complete, listening re-enabled
ASSISTANT:
scalar27 commentedon Oct 12, 2026
Note that the audio glitches do (almost completely) go away if I set --playback-buffer-ms 1200 in s2s, but then there is a noticeable delay before the audio begins.
0xShug0 commentedon Oct 12, 2026
Hi @scalar27 I can’t reproduce the issue on an M4 using your server configuration. However, since increasing
--playback-buffer-msto 1200 almost eliminates the glitch, the M1 may not generate subsequent audio chunks quickly enough to keep the 300 ms playback buffer filled. Could you keep--playback-buffer-ms 300and add"stream_chunk_policy": "fixed"to default_request_options, and check whether the glitch disappears?1 frame = 80ms, and 4 is 320 ms of audio buffered.
Please send requests directly to the audio.cpp server without other components to isolate the issue.
scalar27 commentedon Oct 12, 2026
I will play more but this seems to be helping. I'll report back tomorrow. Thanks again!
scalar27 commentedon Oct 16, 2026
I seem to be glitch free now. I did update s2s and that helped as well. BTW, I found this discussion:
https://huggingface.co/BreezeBlue/Breeze-TTS-2/discussions/17
that might be interesting, especially the mention of a streaming bug in mlx-audio's Qwen3-TTS codec decoder.