### Start F5TTS Socket Server Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/infer/README.md Command to start the F5TTS socket server for real-time voice output. Ensure PyAudio is installed if needed. ```bash # Start socket server python src/f5_tts/socket_server.py ``` -------------------------------- ### Run Install Script (Direct Install) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Navigate to the cloned TTS-Audio-Suite directory and run the install script. This command assumes the virtual environment is activated. ```bash cd custom_nodes/TTS-Audio-Suite python install.py ``` -------------------------------- ### Install qwen-asr with Transformers Backend Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Install the minimal qwen-asr package with support for the transformers backend. This is the basic installation for Qwen3-ASR. ```bash pip install -U qwen-asr ``` -------------------------------- ### Install PyAudio Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/infer/README.md Commands to install PyAudio if it is not already installed, required for socket communication. ```bash # If PyAudio not installed sudo apt-get install portaudio19-dev pip install pyaudio ``` -------------------------------- ### Multiline Version Bump Examples Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/BUMP_SCRIPT_INSTRUCTIONS.md Examples demonstrating how to use the script for patch, minor, and major releases with detailed multiline commit and changelog descriptions. ```bash python3 scripts/bump_version_enhanced.py 3.2.9 "Fix character alias resolution Technical details: - Fix parser bypassing character tags in single mode - Improve character name validation logic - Add fallback handling for unrecognized tags" "Fix character name handling issues - Fix character tags not being removed from TTS output - Improve character name recognition accuracy - Better error handling for invalid character names" ``` ```bash python3 scripts/bump_version_enhanced.py 3.3.0 "Add Higgs Audio 2 TTS engine Implementation details: - Integrate boson_multimodal voice cloning system - Add unified adapter for consistent interface - Implement voice preset management" "Add Higgs Audio 2 TTS engine with voice cloning - New realistic voice synthesis engine - Voice cloning from short audio samples - Multiple built-in voice presets available" ``` ```bash python3 scripts/bump_version_enhanced.py 4.0.0 "Complete unified architecture implementation Breaking changes: - Migrate all nodes to unified interface pattern - Consolidate engine adapters and processors - Remove deprecated standalone variants" "Major architecture upgrade to unified system - All TTS engines now use consistent interface - Better performance and memory management - Simplified workflows with consolidated nodes - Breaking: old standalone nodes removed" ``` -------------------------------- ### Install qwen-asr from Source Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Install the qwen-asr package in editable mode from a local clone of the repository. This is useful for development or modifying the code. ```bash git clone https://github.com/QwenLM/Qwen3-ASR.git cd Qwen3-ASR pip install -e . # support vLLM backend # pip install -e ".[vllm]" ``` -------------------------------- ### Install Qwen-ASR and Datasets Packages Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/finetuning/README.md Install the necessary Python packages for Qwen-ASR fine-tuning. This includes the core `qwen-asr` library and the `datasets` package for data handling. ```bash pip install -U qwen-asr datasets ``` -------------------------------- ### Run Install Script (Manager Install Troubleshooting) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md If issues arise after installation via ComfyUI Manager, run the install script manually to ensure all dependencies are correctly installed. Ensure your virtual environment is activated. ```bash python install.py ``` -------------------------------- ### Check FFmpeg Installation Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/train/README.md Verify that FFmpeg is installed on your system. If not, install it before proceeding. ```bash ffmpeg -version ``` -------------------------------- ### Install System Dependencies on Linux Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Use these commands to install necessary system libraries for audio processing on Ubuntu/Debian or Fedora/RHEL systems. ```bash sudo apt-get install libsamplerate0-dev portaudio19-dev ``` ```bash sudo dnf install libsamplerate-devel portaudio-devel ``` -------------------------------- ### Install F5-TTS and Dependencies Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/F5TTS_IMPLEMENTATION_SUMMARY.md Installs the F5-TTS package from its repository and then installs additional project-specific dependencies. ```bash git clone https://github.com/SWivid/F5-TTS.git cd F5-TTS pip install -e . pip install -r requirements_f5tts.txt ``` -------------------------------- ### Install qwen-asr with vLLM Backend Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Install the qwen-asr package with the vLLM backend enabled for faster inference and streaming support. This requires additional dependencies. ```bash pip install -U qwen-asr[vllm] ``` -------------------------------- ### Full Combination Example Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/Step_Audio_EditX_Inline_Tags_Plan.md An example demonstrating a comprehensive use of segment parameters and multiple inline editing tags. ```text [Alice|seed:42] Hello my friend! ``` -------------------------------- ### Install vLLM for Qwen3-ASR Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Installs the nightly version of vLLM with support for Qwen3-ASR, including additional audio dependencies. Recommends using `uv` as the environment manager. ```bash uv venv source .venv/bin/activate uv pip install -U vllm --pre \ --extra-index-url https://wheels.vllm.ai/nightly/cu129 \ --extra-index-url https://download.pytorch.org/whl/cu129 \ --index-strategy unsafe-best-match uv pip install "vllm[audio]" ``` -------------------------------- ### Run Intelligent Installer (ComfyUI Portable) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Execute the install.py script using the embedded Python interpreter for ComfyUI Portable installations. ```bash # Windows: ..\..\..\python_embeded\python.exe install.py ``` ```bash # Linux/Mac: ../../../python_embeded/python.exe install.py ``` -------------------------------- ### Install FFmpeg on Windows Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Install FFmpeg on Windows using winget or Chocolatey package managers for enhanced audio processing. ```bash winget install FFmpeg ``` ```bash choco install ffmpeg ``` -------------------------------- ### Install FFmpeg on Linux Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Install FFmpeg on Linux systems using apt-get for Ubuntu/Debian or dnf for Fedora. ```bash sudo apt-get install ffmpeg ``` ```bash sudo dnf install ffmpeg ``` -------------------------------- ### Install Linux System Libraries Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Required system libraries for audio processing on Ubuntu/Debian and Fedora/RHEL. Install these before proceeding with Python package installations. ```bash sudo apt-get install portaudio19-dev libsamplerate0-dev ``` ```bash sudo dnf install portaudio-devel libsamplerate-devel ``` -------------------------------- ### Install FlashAttention 2 with MAX_JOBS Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/finetuning/README.md Install FlashAttention 2 with a specified number of maximum jobs, useful for machines with limited RAM and many CPU cores. This can help manage resources during installation. ```bash MAX_JOBS=4 pip install -U flash-attn --no-build-isolation ``` -------------------------------- ### Higgs Audio Voice Preset Configuration Example Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/HIGGS_AUDIO_2_INTEGRATION_SPECIFICATION.md An example JSON configuration file for defining voice presets in the Higgs Audio system. It maps voice names to descriptive transcripts. ```json { "belinda": { "transcript": "This is Belinda's voice with clear pronunciation and natural intonation." }, "en_woman": { "transcript": "A natural English woman's voice for general purpose use." } } ``` -------------------------------- ### Start ComfyUI and Run Integration Tests Source: https://github.com/diodiogod/tts-audio-suite/blob/main/tests/TESTING.md Use these commands to start the ComfyUI server in one terminal and then run the integration tests in another. Ensure you are in the correct directories before executing. ```bash # Terminal 1: Start ComfyUI cd C:\_stability_matrix\Data\Packages\Comfy-new virtualenv\Scripts\python main.py # Terminal 2: Run tests cd custom_nodes\TTS-Audio-Suite ..\..\venv\Scripts\python -m pytest tests/integration/ -m integration -v ``` -------------------------------- ### TOML Configuration for Multi-Style Generation Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/infer/README.md Example TOML file configuration for multi-style text-to-speech generation. Refer to the specified example file for details. ```toml # Refer to src/f5_tts/infer/examples/multi/story.toml for details. ``` -------------------------------- ### Install FlashAttention 2 for Performance Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/finetuning/README.md Install FlashAttention 2 to optimize GPU memory usage and training speed. This is recommended for faster fine-tuning. Ensure your hardware is compatible. ```bash pip install -U flash-attn --no-build-isolation ``` -------------------------------- ### Install FlashAttention 2 Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Install FlashAttention 2 for reduced GPU memory usage and accelerated inference. Use MAX_JOBS for machines with limited RAM and many CPU cores. Ensure hardware compatibility. ```bash pip install -U flash-attn --no-build-isolation ``` ```bash MAX_JOBS=4 pip install -U flash-attn --no-build-isolation ``` -------------------------------- ### Navigate to Node Directory (Manager Install) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Navigate to the TTS Audio Suite's directory within ComfyUI's custom_nodes. This is a preparatory step if manual dependency installation is needed after using the ComfyUI Manager. ```bash cd ComfyUI/custom_nodes/TTS-Audio-Suite ``` -------------------------------- ### Launch Qwen3-ASR Gradio Demo Help Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Use this command to view the help message for the qwen-asr-demo script, which outlines available options and configurations. ```bash qwen-asr-demo --help ``` -------------------------------- ### F5TTS Timing Data Format Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/🌊_Audio_Wave_Analyzer-Complete_User_Guide.md Example of timing data exported in the F5TTS format, showing start and end times for detected segments. ```text 1.500,3.200 4.000,6.800 8.100,10.500 ``` -------------------------------- ### Start vLLM Server for Qwen3-ASR Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launch a vLLM server for Qwen3-ASR using the `qwen-asr-serve` command. This command is a wrapper around `vllm serve` and accepts arguments compatible with it, such as GPU memory utilization, host, and port. ```bash qwen-asr-serve Qwen/Qwen3-ASR-1.7B --gpu-memory-utilization 0.8 --host 0.0.0.0 --port 8000 ``` -------------------------------- ### CSV Timing Data Format Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/🌊_Audio_Wave_Analyzer-Complete_User_Guide.md Example of timing data exported in CSV format, including start, end, label, confidence, and duration for each segment. ```csv start,end,label,confidence,duration 1.500,3.200,speech,1.00,1.700 4.000,6.800,speech,1.00,2.800 ``` -------------------------------- ### Launch Training with Accelerate Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/train/README.md Start the training process using Accelerate launch with a specified configuration file. Configuration files are located in src/f5_tts/configs. ```bash accelerate launch src/f5_tts/train/train.py --config-name F5TTS_v1_Base.yaml ``` -------------------------------- ### JSON Timing Data Format Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/🌊_Audio_Wave_Analyzer-Complete_User_Guide.md Example of timing data exported in JSON format, including start, end, label, confidence, and metadata for each segment. ```json [ { "start": 1.500, "end": 3.200, "label": "speech", "confidence": 1.00, "metadata": {"type": "speech"} } ] ``` -------------------------------- ### Qwen3-ASR Basic Transcription Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Load the Qwen3-ASR model and transcribe a single audio file from a URL. This example shows how to get the detected language and transcribed text. ```python import torch from qwen_asr import Qwen3ASRModel model = Qwen3ASRModel.from_pretrained( "Qwen/Qwen3-ASR-1.7B", dtype=torch.bfloat16, device_map="cuda:0", # attn_implementation="flash_attention_2", max_inference_batch_size=32, # Batch size limit for inference. -1 means unlimited. Smaller values can help avoid OOM. max_new_tokens=256, # Maximum number of tokens to generate. Set a larger value for long audio input. ) results = model.transcribe( audio="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_en.wav", language=None, # set "English" to force the language ) print(results[0].language) print(results[0].text) ``` -------------------------------- ### Launch Qwen3-ASR Demo with Transformers Backend Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches the Qwen3-ASR Gradio demo using the Transformers backend. Ensure the Qwen/Qwen3-ASR-1.7B checkpoint is accessible. ```bash qwen-asr-demo \ --asr-checkpoint Qwen/Qwen3-ASR-1.7B \ --backend transformers \ --cuda-visible-devices 0 \ --ip 0.0.0.0 --port 8000 ``` -------------------------------- ### vLLM Offline Inference with Audio Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Performs offline inference with Qwen3-ASR using vLLM. This example loads an audio asset and uses the `llm.chat()` method to get a transcription. ```python from vllm import LLM, SamplingParams from vllm.assets.audio import AudioAsset import base64 import requests # Initialize the LLM llm = LLM( model="Qwen/Qwen3-ASR-1.7B" ) # Load audio audio_asset = AudioAsset("winning_call") # Create conversation with audio content conversation = [ { "role": "user", "content": [ { "type": "audio_url", "audio_url": {"url": audio_asset.url} } ] } ] sampling_params = SamplingParams(temperature=0.01, max_tokens=256) # Run inference using .chat() outputs = llm.chat(conversation, sampling_params=sampling_params) print(outputs[0].outputs[0].text) ``` -------------------------------- ### Manual Region Definition Example Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/🌊_Audio_Wave_Analyzer-Complete_User_Guide.md Defines custom timing regions for audio analysis using a 'start,end' format, with each region on a new line. This feature supports bidirectional synchronization and auto-sorting, and can be used in conjunction with automatic detection. ```text 1.5,3.2 4.0,6.8 8.1,10.5 ``` -------------------------------- ### Launch Qwen3-ASR Demo with vLLM Backend and Forced Aligner Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches the Qwen3-ASR Gradio demo using the vLLM backend and includes the forced aligner for timestamp generation. vLLM specific arguments are passed via backend-kwargs. ```bash qwen-asr-demo \ --asr-checkpoint Qwen/Qwen3-ASR-1.7B \ --aligner-checkpoint Qwen/Qwen3-ForcedAligner-0.6B \ --backend vllm \ --cuda-visible-devices 0 \ --backend-kwargs '{"gpu_memory_utilization":0.7,"max_inference_batch_size":8,"max_new_tokens":2048}' \ --aligner-kwargs '{"device_map":"cuda:0","dtype":"bfloat16"}' \ --ip 0.0.0.0 --port 8000 ``` -------------------------------- ### Initialize Qwen3-ASR with vLLM Backend Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Use this snippet to initialize the Qwen3-ASR model with the vLLM backend for optimal inference speed. Ensure vLLM and FlashAttention are installed for enhanced performance, especially when outputting timestamps. Wrap code in `if __name__ == '__main__':` to prevent multiprocessing errors. ```python import torch from qwen_asr import Qwen3ASRModel if __name__ == '__main__': model = Qwen3ASRModel.LLM( model="Qwen/Qwen3-ASR-1.7B", gpu_memory_utilization=0.7, max_inference_batch_size=128, # Batch size limit for inference. -1 means unlimited. Smaller values can help avoid OOM. max_new_tokens=4096, # Maximum number of tokens to generate. Set a larger value for long audio input. forced_aligner="Qwen/Qwen3-ForcedAligner-0.6B", forced_aligner_kwargs=dict( dtype=torch.bfloat16, device_map="cuda:0", # attn_implementation="flash_attention_2", ), ) results = model.transcribe( audio=[ "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_zh.wav", "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_en.wav", ], language=["Chinese", "English"], # can also be set to None for automatic language detection return_time_stamps=True, ) for r in results: print(r.language, r.text, r.time_stamps[0]) ``` -------------------------------- ### Online Serving with OpenAI SDK (Chat Completions) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Demonstrates how to use the OpenAI SDK to interact with a vLLM-deployed Qwen3-ASR model for chat completions, including audio input. ```APIDOC ## Chat Completions with OpenAI SDK ### Description This example shows how to send an audio file to the Qwen3-ASR model using the OpenAI SDK for chat completion, enabling transcription and understanding of audio content. ### Method POST ### Endpoint /v1/chat/completions ### Parameters #### Request Body - **model** (string) - Required - The name of the model to use (e.g., "Qwen/Qwen3-ASR-1.7B"). - **messages** (array) - Required - A list of message objects representing the conversation. - **role** (string) - Required - The role of the message sender ('user' or 'assistant'). - **content** (array) - Required - The content of the message, which can include text or audio. - **type** (string) - Required - The type of content ('text' or 'audio_url'). - **audio_url** (object) - Required - An object containing the URL of the audio file. - **url** (string) - Required - The URL of the audio file. ### Request Example ```python import base64 import httpx from openai import OpenAI client = OpenAI( base_url="http://localhost:8000/v1", api_key="EMPTY" ) response = client.chat.completions.create( model="Qwen/Qwen3-ASR-1.7B", messages=[ { "role": "user", "content": [ { "type": "audio_url", "audio_url": { "url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_en.wav" } } ] } ], ) print(response.choices[0].message.content) ``` ### Response #### Success Response (200) - **choices** (array) - A list of response choices. - **message** (object) - The message from the model. - **content** (string) - The transcribed or understood content from the audio. ``` -------------------------------- ### Run Install Script (Portable Install) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Execute the install script using the embedded Python executable found in the ComfyUI portable installation. This handles Python dependencies. ```bash ../../../python_embeded/python.exe install.py ``` -------------------------------- ### Run Qwen3-ASR Streaming Demo Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches a Flask-based streaming demo for Qwen3-ASR. Captures microphone audio, resamples it, and pushes PCM chunks to the model for real-time transcription. ```bash qwen-asr-demo-streaming \ --asr-model-path Qwen/Qwen3-ASR-1.7B \ --gpu-memory-utilization 0.9 \ --host 0.0.0.0 \ --port 8000 ``` -------------------------------- ### Launch Qwen3-ASR Demo with Transformers Backend and Forced Aligner Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches the Qwen3-ASR Gradio demo with the Transformers backend and enables timestamps by including the Qwen/Qwen3-ForcedAligner-0.6B checkpoint. Backend and aligner specific arguments are provided via kwargs. ```bash qwen-asr-demo \ --asr-checkpoint Qwen/Qwen3-ASR-1.7B \ --aligner-checkpoint Qwen/Qwen3-ForcedAligner-0.6B \ --backend transformers \ --cuda-visible-devices 0 \ --backend-kwargs '{"device_map":"cuda:0","dtype":"bfloat16","max_inference_batch_size":8,"max_new_tokens":256}' \ --aligner-kwargs '{"device_map":"cuda:0","dtype":"bfloat16"}' \ --ip 0.0.0.0 --port 8000 ``` -------------------------------- ### Install Evaluation Packages Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/eval/README.md Install the necessary packages for evaluation using pip. This command installs the package in editable mode with evaluation dependencies. ```bash pip install -e .[eval] ``` -------------------------------- ### Launch Training with Overrides Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/f5_tts/train/README.md Launch training with Accelerate, overriding default Accelerate and Hydra configurations. This example sets mixed precision to fp16 and adjusts the batch size per GPU. ```bash accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_v1_Base.yaml ++datasets.batch_size_per_gpu=19200 ``` -------------------------------- ### Install descript-audiotools with --no-deps Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/DEPENDENCY_MANAGEMENT_GUIDE.md Installs descript-audiotools without its dependencies to prevent conflicts, specifically with protobuf versions. Manual installation of its required dependencies is necessary. ```python pip install descript-audiotools --no-deps ``` -------------------------------- ### Download Qwen3-ASR Models with Hugging Face CLI Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Manually download model weights using the Hugging Face CLI. Ensure you have the 'huggingface_hub' package installed. ```bash pip install -U "huggingface_hub[cli]" huggingface-cli download Qwen/Qwen3-ASR-1.7B --local-dir ./Qwen3-ASR-1.7B huggingface-cli download Qwen/Qwen3-ASR-0.6B --local-dir ./Qwen3-ASR-0.6B huggingface-cli download Qwen/Qwen3-ForcedAligner-0.6B --local-dir ./Qwen3-ForcedAligner-0.6B ``` -------------------------------- ### Install Librosa with --no-deps Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/DEPENDENCY_MANAGEMENT_GUIDE.md Installs librosa without its dependencies to avoid conflicts with the existing dependency tree. Manual installation of librosa's actual dependencies is required afterward. ```python pip install librosa --no-deps # Then manually install librosa's actual dependencies ``` -------------------------------- ### Install PyTorch and Triton on Windows Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/qwen3_tts_optimizations.md Installs the required PyTorch version with CUDA 13.0 support and triton-windows for optimization. Ensure Visual Studio Build Tools with C++ toolchain are also installed. ```bash pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130 pip install -U "triton-windows<3.7" ``` -------------------------------- ### Online Serving with OpenAI SDK (Audio Transcriptions) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Shows how to use the OpenAI SDK to get audio transcriptions from a vLLM-deployed Qwen3-ASR model. ```APIDOC ## Audio Transcriptions with OpenAI SDK ### Description This example demonstrates how to use the OpenAI SDK to transcribe an audio file using the Qwen3-ASR model served by vLLM. ### Method POST ### Endpoint /v1/audio/transcriptions ### Parameters #### Request Body - **model** (string) - Required - The name of the model to use (e.g., "Qwen/Qwen3-ASR-1.7B"). - **file** (file) - Required - The audio file to transcribe. ### Request Example ```python import httpx from openai import OpenAI client = OpenAI( base_url="http://localhost:8000/v1", api_key="EMPTY" ) audio_url = "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_en.wav" audio_file = httpx.get(audio_url).content transcription = client.audio.transcriptions.create( model="Qwen/Qwen3-ASR-1.7B", file=audio_file, ) print(transcription.text) ``` ### Response #### Success Response (200) - **text** (string) - The transcribed text from the audio. ``` -------------------------------- ### Install FFmpeg on macOS Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Install FFmpeg on macOS using the Homebrew package manager. ```bash brew install ffmpeg ``` -------------------------------- ### Basic F5-TTS Node Usage Example Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/F5TTS_IMPLEMENTATION_SUMMARY.md Demonstrates the basic input parameters required for the F5-TTS node, including text, reference text, reference audio, model selection, device, and chunking enablement. ```json { "text": "Hello! This is F5-TTS integrated with ChatterBox Voice.", "ref_text": "This is my reference text that matches the audio.", "reference_audio": "", "model": "F5TTS_Base", "device": "auto", "enable_chunking": true } ``` -------------------------------- ### Platform-Specific FAISS Installation Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/DEPENDENCY_MANAGEMENT_GUIDE.md Installs the appropriate FAISS package based on the operating system and CUDA availability. It attempts to install the GPU version on Linux with CUDA, falling back to the CPU version if necessary or if on Windows. ```python if not is_windows and cuda_detected: try: pip install faiss-gpu-cu12 # Linux + CUDA except: pip install faiss-cpu # Fallback else: pip install faiss-cpu # Windows/CPU-only ``` -------------------------------- ### Quick Inference Test with Qwen3ASRModel Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/finetuning/README.md Demonstrates how to load a fine-tuned Qwen3-ASR model and perform transcription on a sample audio file. It shows how to access the predicted language and text from the results. ```python import torch from qwen_asr import Qwen3ASRModel model = Qwen3ASRModel.from_pretrained( "qwen3-asr-finetuning-out/checkpoint-200", dtype=torch.bfloat16, device_map="cuda:0", ) results = model.transcribe( audio="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-ASR-Repo/asr_en.wav", ) print(results[0].language) print(results[0].text) ``` -------------------------------- ### Install Dependencies Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/SRT_IMPLEMENTATION_OLD.md Install the required Python packages for the ChatterBox TTS project using pip. ```bash pip install -r requirements.txt ``` -------------------------------- ### Basic Parameter Syntax Examples Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/PARAMETER_SWITCHING_GUIDE.md Demonstrates the fundamental syntax for applying parameters to individual text segments. Parameters can be specified before or after the character name, and multiple parameters can be combined. ```text [Alice|seed:42] Hi there with a specific seed! [Bob|temperature:0.5] Bob speaks more deterministically. [Alice|seed:42|temperature:0.7] Alice with both seed and temperature. [seed:42|Alice] Order doesn't matter! ``` -------------------------------- ### Install macOS System Dependencies Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Install portaudio on macOS using Homebrew. This is a prerequisite for certain audio functionalities. ```bash brew install portaudio ``` -------------------------------- ### Launch Qwen3-ASR Demo with Forced Aligner Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches the Qwen3-ASR Gradio demo with a forced aligner, enabling the generation of timestamps. ```bash qwen-asr-demo \ --asr-checkpoint Qwen/Qwen3-ASR-1.7B \ --aligner-checkpoint Qwen/Qwen3-ForcedAligner-0.6B ``` -------------------------------- ### Example SRT Content Source: https://github.com/diodiogod/tts-audio-suite/blob/main/docs/Dev reports/SRT_IMPLEMENTATION_OLD.md Provides a standard SRT file format example with sequential numbering, timestamps, and corresponding text. ```srt 1 00:00:01,000 --> 00:00:04,000 Welcome to our presentation about artificial intelligence. 2 00:00:05,000 --> 00:00:08,500 Today we'll explore how AI is transforming various industries. 3 00:00:10,000 --> 00:00:13,000 Let's start with the basics of machine learning. ``` -------------------------------- ### Launch Qwen3-ASR Demo with HTTPS Enabled Source: https://github.com/diodiogod/tts-audio-suite/blob/main/engines/qwen3_asr/impl/README.md Launches the Qwen3-ASR Gradio demo with HTTPS enabled using the generated certificate and key. The --no-ssl-verify flag is included for self-signed certificates. ```bash qwen-asr-demo \ --asr-checkpoint Qwen/Qwen3-ASR-1.7B \ --backend transformers \ --cuda-visible-devices 0 \ --ip 0.0.0.0 --port 8000 \ --ssl-certfile cert.pem \ --ssl-keyfile key.pem \ --no-ssl-verify ``` -------------------------------- ### Run Intelligent Installer (ComfyUI with venv/conda) Source: https://github.com/diodiogod/tts-audio-suite/blob/main/README.md Run the install.py script after activating your ComfyUI environment for installations using venv or conda. ```bash # First activate your ComfyUI environment, then: python install.py ```