bob_q3tts.tts_node
Classes
ROS node that provides an interface to Qwen3-TTS with streaming text aggregation. |
Functions
|
Module Contents
- class bob_q3tts.tts_node.TTSnode
Bases:
rclpy.node.NodeROS node that provides an interface to Qwen3-TTS with streaming text aggregation.
- text_buffer = ''
- last_text_time
- text_queue
- audio_queue
- lock
- file_index
- inferred_target_sr = None
- sub
- pub
- audio_pub
- model = None
- sd = None
- sf = None
- torch = None
- tts_thread
- audio_thread
- flush_timer
- _get_sf()
Lazy load soundfile library.
- text_callback(msg)
Aggregate incoming words/text into sentences based on delimiters.
- flush_timer_callback()
Flush the text buffer if the timeout has passed.
- tts_loop()
Process the text queue and generate audio.
- audio_loop()
Consume the audio queue for playback and storage.
- play_audio(audio_data, sr)
Play audio using native library or configured executable.
- _do_native_play(audio_data, sr)
Internal helper for sounddevice.play.
- resample_audio(audio_data, orig_sr, target_sr)
Resample audio data using librosa if available, else linear interpolation.
- _play_with_executable(executable, audio_data, sr)
Play audio using an external command.
- bob_q3tts.tts_node.main(args=None)