Modules required for conversation, released as a Python SDK.
Project description
respeak
Provides the modules required for conversation and is released as a Python SDK.
Install
pip install respeak-ai
# local development
pip install -e .
Optional extras:
pip install "respeak-ai[vad]"
pip install "respeak-ai[tts]"
pip install "respeak-ai[llm]"
pip install "respeak-ai[a2f]"
pip install "respeak-ai[a2f-trt]" # Audio2Face + TensorRT (faster ONNX EP)
pip install "respeak-ai[dev]"
Supported models
| Module | Class | Recommended weights | Source |
|---|---|---|---|
| ASR | StreamingParaformerAsr |
paraformer-zh-streaming (iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online) |
ModelScope · Hugging Face · FunASR |
| ASR (punc) | used via punc_model= |
ct-punc (iic/punc_ct-transformer_cn-en-common-vocab471067-large) |
ModelScope · Hugging Face |
| TTS | CosyVoice3Tts |
Fun-CosyVoice3-0.5B-2512 |
ModelScope · Hugging Face · CosyVoice |
| VAD | SileroVad |
Silero VAD (auto-download via silero-vad) |
GitHub · PyPI |
| LLM | Qwen3LLM |
Qwen3-8B (or other Qwen3 / Qwen2.5 Instruct checkpoints) |
ModelScope · Hugging Face · Qwen |
| Audio2Face | NvidiaAudio2Face3D |
Audio2Face-3D-v2.3.1-Claire |
Hugging Face · Audio2Face-3D |
Download examples:
# ASR + punctuation (ModelScope)
modelscope download --model iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online \
--local_dir ./models/paraformer-zh-streaming
modelscope download --model iic/punc_ct-transformer_cn-en-common-vocab471067-large \
--local_dir ./models/punc_ct-transformer_cn-en-common-vocab471067-large
# TTS (ModelScope or Hugging Face)
modelscope download --model FunAudioLLM/Fun-CosyVoice3-0.5B-2512 \
--local_dir ./models/Fun-CosyVoice3-0.5B-2512
# LLM
modelscope download --model Qwen/Qwen3-8B --local_dir ./models/Qwen3-8B
# Audio2Face 3D (Hugging Face)
huggingface-cli download nvidia/Audio2Face-3D-v2.3.1-Claire \
--local-dir ./models/audio2face-3d-v2.3.1-claire
Silero VAD needs no manual download: pip install "respeak-ai[vad]" then SileroVad.from_pretrained().
Usage
from respeak import StreamingParaformerAsr, CosyVoice3Tts, SileroVad, Qwen3LLM, NvidiaAudio2Face3D
# ASR
asr = StreamingParaformerAsr.from_pretrained(asr="path/or/model_id", punc_model="path/or/model_id")
text = asr.generate(input=audio_chunk, is_final=False, cache={})
# CosyVoice3 TTS (vLLM)
tts = CosyVoice3Tts.from_pretrained(
model_dir="path/to/TTS_Model",
prompt_text="...",
prompt_wav="path/to/prompt.wav",
load_vllm=True,
)
for wav in tts.generate("你好,欢迎使用本系统。", stream=True):
...
# VAD
vad = SileroVad.from_pretrained()
speech_prob = vad.generate(audio_chunk)
# LLM sentence-level streaming
llm = Qwen3LLM.from_pretrained(
"path/to/LLM_Model_ft",
base_prompt_file="path/to/base_prompt.md",
persona_setting="你叫小睿,是一个温和的中文助手。",
strategy_prompt="回答要简洁自然。",
)
for sentence in llm.generate("你好,介绍一下你自己。", stream=True):
...
# Audio2Face 3D (requires .[a2f])
a2f = NvidiaAudio2Face3D.from_pretrained("path/to/audio2face-3d-model", use_cuda=True)
frame = a2f.generate(audio_window) # {"audio": [...], "arkit_weights": [51]}
frames = a2f.generate(audio, stream=True, is_final=True) # list[{"audio", "arkit_weights"}]
# UE5 Live Link TCP rendering
from respeak.models.nvidia_audio2face_3d import Ue5BlendshapeRenderer
with Ue5BlendshapeRenderer(tcp_ip="127.0.0.1", tcp_port=12030) as renderer:
renderer.stream_frames(frames, realtime=True)
New model types should live under src/respeak/models/<name>/ (subclass BaseModel, expose from_pretrained / generate). Add matching tests under tests/models/<name>/.
Examples
# ASR
python examples/paraformer_asr_streaming.py \
--asr path/to/ASR_Model \
--punc path/to/PUNC_Model \
--audio path/to/test.wav
# TTS (requires .[tts])
python examples/cosyvoice3_tts_streaming.py \
--model-dir path/to/Fun-CosyVoice3 \
--prompt-wav path/to/prompt.wav \
--prompt-text "..." \
--text "你好,欢迎使用本系统。" \
--output output.wav
# VAD (requires .[vad])
python examples/silerovad_real_inference.py \
--audio path/to/test.wav \
--threshold 0.5
# LLM (requires .[llm])
python examples/qwen3_llm_streaming.py \
--model-path path/to/LLM_Model_ft \
--base-prompt path/to/base_prompt.md \
--text "你好,介绍一下你自己。"
# Audio2Face 3D (requires .[a2f]; add --tensorrt with .[a2f-trt])
python examples/nvidia_audio2face_3d_streaming.py \
--model-dir path/to/audio2face-3d-v2.3.1-claire \
--audio path/to/test.wav \
--output arkit_weights.npy \
--output-audio synced_audio.wav
# Stream to UE5 Audio2Face plugin
python examples/nvidia_audio2face_3d_streaming.py \
--model-dir path/to/audio2face-3d-v2.3.1-claire \
--audio path/to/test.wav \
--ue5-tcp-ip 127.0.0.1 \
--ue5-tcp-port 12030 \
--ue5-realtime
Audio2Face GPU backends
| Mode | Install | Run |
|---|---|---|
| CUDA (default) | pip install "respeak-ai[a2f]" |
omit --tensorrt → CUDAExecutionProvider |
| TensorRT | pip install "respeak-ai[a2f-trt]" |
add --tensorrt → TensorrtExecutionProvider (first run builds TRT engine cache under model dir) |
ORT 1.23 pairs with TensorRT 10.9 (installed via the a2f-trt extra). Without the tensorrt pip package, --tensorrt falls back to CUDA automatically.
Tests
pip install -e ".[dev]"
pytest tests/models -q
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respeak_ai-0.1.8.tar.gz.
File metadata
- Download URL: respeak_ai-0.1.8.tar.gz
- Upload date:
- Size: 250.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acca273adce8ba5152b784c67f21b4bda26a157faf387e95eee41236baac6ed7
|
|
| MD5 |
c12ef1a80c53e4c674351776fa2cd255
|
|
| BLAKE2b-256 |
941da31454e66da4acb5b21662c73d83524da0e247ef4ef5c32b54f0b10b6795
|
Provenance
The following attestation bundles were made for respeak_ai-0.1.8.tar.gz:
Publisher:
publish-pypi.yml on shanguanma/respeak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respeak_ai-0.1.8.tar.gz -
Subject digest:
acca273adce8ba5152b784c67f21b4bda26a157faf387e95eee41236baac6ed7 - Sigstore transparency entry: 2204761427
- Sigstore integration time:
-
Permalink:
shanguanma/respeak@4ece33313c1f09fce7f48732ab7d5049ff3062df -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/shanguanma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4ece33313c1f09fce7f48732ab7d5049ff3062df -
Trigger Event:
push
-
Statement type:
File details
Details for the file respeak_ai-0.1.8-py3-none-any.whl.
File metadata
- Download URL: respeak_ai-0.1.8-py3-none-any.whl
- Upload date:
- Size: 271.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2eee2dc0667d6b38b5cf95fb1f5007d0bad595ad72ffb1fc080a98bb1b4595e
|
|
| MD5 |
d9bebfbf68d245abc58d54906ca25d92
|
|
| BLAKE2b-256 |
75badbf72e42e8ab99fc728ebd3e78f7d908573648ad99f2bcd9217277639006
|
Provenance
The following attestation bundles were made for respeak_ai-0.1.8-py3-none-any.whl:
Publisher:
publish-pypi.yml on shanguanma/respeak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respeak_ai-0.1.8-py3-none-any.whl -
Subject digest:
e2eee2dc0667d6b38b5cf95fb1f5007d0bad595ad72ffb1fc080a98bb1b4595e - Sigstore transparency entry: 2204761452
- Sigstore integration time:
-
Permalink:
shanguanma/respeak@4ece33313c1f09fce7f48732ab7d5049ff3062df -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/shanguanma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4ece33313c1f09fce7f48732ab7d5049ff3062df -
Trigger Event:
push
-
Statement type: