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[vad]"
pip install "respeak[tts]"
pip install "respeak[llm]"
pip install "respeak[dev]"
Usage
from respeak import StreamingParaformerAsr, CosyVoice3Tts, SileroVad, Qwen3LLM
# 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):
...
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 "你好,介绍一下你自己。"
Tests
pip install -e ".[dev]"
pytest tests/models -q
Publish to PyPI
CI runs on every push/PR to main. Publishing is triggered by pushing a version tag.
One-time PyPI setup
- Create a project on PyPI named
respeak. - In PyPI → Publishing → Add a new pending publisher:
- Owner:
shanguanma - Repository:
respeak - Workflow:
publish-pypi.yml - Environment:
pypi
- Owner:
Release flow
# 1. Bump version in pyproject.toml
# 2. Commit and tag
git tag v0.1.1
git push origin main
git push origin v0.1.1
The tag must match pyproject.toml (v0.1.1 ↔ version = "0.1.1").
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.5.tar.gz.
File metadata
- Download URL: respeak_ai-0.1.5.tar.gz
- Upload date:
- Size: 235.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70cdcf38551b099fdcbf37617da6f96414d19dc8cf0a1a0e544aca766ba63c95
|
|
| MD5 |
48e4c29b8450b133e22bde62e1daeba1
|
|
| BLAKE2b-256 |
14199b11dab1c6fd20dd6d8472ae40f4324b724af54b354f49a94a7ea54530db
|
Provenance
The following attestation bundles were made for respeak_ai-0.1.5.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.5.tar.gz -
Subject digest:
70cdcf38551b099fdcbf37617da6f96414d19dc8cf0a1a0e544aca766ba63c95 - Sigstore transparency entry: 2189132960
- Sigstore integration time:
-
Permalink:
shanguanma/respeak@7b53732d008f0e43d4962b8bc45643b7b3ab413e -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/shanguanma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7b53732d008f0e43d4962b8bc45643b7b3ab413e -
Trigger Event:
push
-
Statement type:
File details
Details for the file respeak_ai-0.1.5-py3-none-any.whl.
File metadata
- Download URL: respeak_ai-0.1.5-py3-none-any.whl
- Upload date:
- Size: 255.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fadc592c54234c3cf179ffa2d852b30b4d8a1118bf8522b01cd7e2fb719212f
|
|
| MD5 |
2d6fd79b6acc818ce370cde30e972c9b
|
|
| BLAKE2b-256 |
b62798cf395cd6421ed4a087e306046f2d007cb2446f08f1058b3881d4690524
|
Provenance
The following attestation bundles were made for respeak_ai-0.1.5-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.5-py3-none-any.whl -
Subject digest:
3fadc592c54234c3cf179ffa2d852b30b4d8a1118bf8522b01cd7e2fb719212f - Sigstore transparency entry: 2189132980
- Sigstore integration time:
-
Permalink:
shanguanma/respeak@7b53732d008f0e43d4962b8bc45643b7b3ab413e -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/shanguanma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7b53732d008f0e43d4962b8bc45643b7b3ab413e -
Trigger Event:
push
-
Statement type: