Experimental Gradio Space demo for VoxCPM2 powered by nanovllm-voxcpm.
This repo keeps the existing Gradio frontend layout and swaps only the backend inference path to Nano-vLLM.
Notes:
flash-attn and nanovllm-voxcpm are pinned in requirements.txt, so they install during Space build instead of on first request.iic/speech_zipenhancer_ans_multiloss_16k_base./data exists, request logs are written to daily JSONL files like /data/logs/2026-04-05.jsonl.SenseVoiceSmall is downloaded from Hugging Face and cached locally before ASR initialization.ASR_DEVICE defaults to cpu to avoid competing with TTS GPU memory.LocDiT flow-matching steps slider is wired to Nano-vLLM server inference_timesteps; changing it rebuilds the backend server.normalize toggle is kept for UI compatibility, but Nano-vLLM currently ignores it.denoise toggle now runs ZipEnhancer on the reference audio before encoding it to latents.packages.txt is required because this path needs extra system build dependencies.Stability recommendation:
/data is available.1 unless you have profiled GPU memory headroom.Recommended environment variables:
HF_REPO_ID: Hugging Face model repo id. Defaults to openbmb/VoxCPM2HF_TOKEN: required if the model repo is privateNANOVLLM_MODEL: optional direct model ref override. Can be a local path or HF repo idNANOVLLM_MODEL_PATH: optional local model path overrideASR_DEVICE: defaults to cpuZIPENHANCER_MODEL_ID: optional ModelScope denoiser model id or local path. Defaults to iic/speech_zipenhancer_ans_multiloss_16k_baseNANOVLLM_INFERENCE_TIMESTEPS: initial default is 10NANOVLLM_PREWARM: defaults to trueNANOVLLM_SERVERPOOL_MAX_NUM_BATCHED_TOKENS: defaults to 8192NANOVLLM_SERVERPOOL_MAX_NUM_SEQS: defaults to 16NANOVLLM_SERVERPOOL_MAX_MODEL_LEN: defaults to 4096NANOVLLM_SERVERPOOL_GPU_MEMORY_UTILIZATION: defaults to 0.95NANOVLLM_SERVERPOOL_ENFORCE_EAGER: defaults to falseNANOVLLM_SERVERPOOL_DEVICES: defaults to 0NANOVLLM_MAX_GENERATE_LENGTH: defaults to 2000NANOVLLM_TEMPERATURE: defaults to 1.0REQUEST_LOG_DIR: optional persistent request log directory. Defaults to /data/logs when /data existsGRADIO_QUEUE_MAX_SIZE: defaults to 30GRADIO_DEFAULT_CONCURRENCY_LIMIT: defaults to 6 (uses async server pool bridge for thread-safe concurrency)NANOVLLM_API_CONNECT_TIMEOUT: defaults to 5NANOVLLM_API_ASR_TIMEOUT: defaults to 30NANOVLLM_API_DENOISE_TIMEOUT: defaults to 60NANOVLLM_API_GENERATE_TIMEOUT: defaults to 120DENOISE_MAX_CONCURRENT: defaults to 1 (limits concurrent ZipEnhancer denoise requests to avoid GPU OOM)GRADIO_SSR_MODE: defaults to falseExperimental Gradio Space demo for VoxCPM2 powered by nanovllm-voxcpm.
This repo keeps the existing Gradio frontend layout and swaps only the backend inference path to Nano-vLLM.
Notes:
flash-attn and nanovllm-voxcpm are pinned in requirements.txt, so they install during Space build instead of on first request.iic/speech_zipenhancer_ans_multiloss_16k_base./data exists, request logs are written to daily JSONL files like /data/logs/2026-04-05.jsonl.SenseVoiceSmall is downloaded from Hugging Face and cached locally before ASR initialization.ASR_DEVICE defaults to cpu to avoid competing with TTS GPU memory.LocDiT flow-matching steps slider is wired to Nano-vLLM server inference_timesteps; changing it rebuilds the backend server.normalize toggle is kept for UI compatibility, but Nano-vLLM currently ignores it.denoise toggle now runs ZipEnhancer on the reference audio before encoding it to latents.packages.txt is required because this path needs extra system build dependencies.Stability recommendation:
/data is available.1 unless you have profiled GPU memory headroom.Recommended environment variables:
HF_REPO_ID: Hugging Face model repo id. Defaults to openbmb/VoxCPM2HF_TOKEN: required if the model repo is privateNANOVLLM_MODEL: optional direct model ref override. Can be a local path or HF repo idNANOVLLM_MODEL_PATH: optional local model path overrideASR_DEVICE: defaults to cpuZIPENHANCER_MODEL_ID: optional ModelScope denoiser model id or local path. Defaults to iic/speech_zipenhancer_ans_multiloss_16k_baseNANOVLLM_INFERENCE_TIMESTEPS: initial default is 10NANOVLLM_PREWARM: defaults to trueNANOVLLM_SERVERPOOL_MAX_NUM_BATCHED_TOKENS: defaults to 8192NANOVLLM_SERVERPOOL_MAX_NUM_SEQS: defaults to 16NANOVLLM_SERVERPOOL_MAX_MODEL_LEN: defaults to 4096NANOVLLM_SERVERPOOL_GPU_MEMORY_UTILIZATION: defaults to 0.95NANOVLLM_SERVERPOOL_ENFORCE_EAGER: defaults to falseNANOVLLM_SERVERPOOL_DEVICES: defaults to 0NANOVLLM_MAX_GENERATE_LENGTH: defaults to 2000NANOVLLM_TEMPERATURE: defaults to 1.0REQUEST_LOG_DIR: optional persistent request log directory. Defaults to /data/logs when /data existsGRADIO_QUEUE_MAX_SIZE: defaults to 30GRADIO_DEFAULT_CONCURRENCY_LIMIT: defaults to 6 (uses async server pool bridge for thread-safe concurrency)NANOVLLM_API_CONNECT_TIMEOUT: defaults to 5NANOVLLM_API_ASR_TIMEOUT: defaults to 30NANOVLLM_API_DENOISE_TIMEOUT: defaults to 60NANOVLLM_API_GENERATE_TIMEOUT: defaults to 120DENOISE_MAX_CONCURRENT: defaults to 1 (limits concurrent ZipEnhancer denoise requests to avoid GPU OOM)GRADIO_SSR_MODE: defaults to false