Skip to main content

huri-module-tts

HuRI's text-to-speech modules: they speak the assistant's reply. One package, two engines, each a module of its own with its own dependencies (an extra), so a host installs only the engine it runs:

Module Engine Extra Topics Deployment
tts Piper: ONNX only, no torch, no GPU, ~30x faster than realtime on a laptop CPU. The default: it runs on any machine. piper huri.token → huri.audio.out TTSHandle
tts_cosyvoice CosyVoice3: clones the voice of a reference sample. Needs an NVIDIA GPU for real time (~7x slower than realtime on CPU; its vocoder faults on consumer RDNA3 GPUs). cosyvoice huri.token → huri.audio.out CosyVoiceTTSHandle

Both are built on huri_tts.streaming.StreamingTTS, the engine-agnostic half: it opens one synthesis session per utterance, pushes each huri.token into it in order and streams huri.audio.out back with presentation timestamps.

The base install has no engine library; [tool.huri-modules.extras] in pyproject.toml names the extra each module needs (huri hub install and scripts/install_local.sh add it). CosyVoice's hardware pins are requirements-<variant>.tts_cosyvoice.txt: only a host that plans tts_cosyvoice gets them, so they never meet Piper's onnxruntime.

Upgrading from the three packages this one replaced (huri-tts, huri-module-tts-piper, huri-module-tts-cosyvoice): pip uninstall huri-tts huri-module-tts-piper huri-module-tts-cosyvoice first (./install.sh does it). Left installed, they claim the module names tts and tts_cosyvoice too, and huri-core then loads no module at all.

Piper (tts):

pip install -e 'packages/huri-module-tts[piper]'
python -m piper.download_voices --download-dir assets/models/piper en_US-lessac-medium
HURI_PIPER_VOICE=assets/models/piper/en_US-lessac-medium.onnx HURI_MODULES=...,tts ...

CosyVoice3 (tts_cosyvoice):

pip install -c constraints.txt --extra-index-url https://download.pytorch.org/whl/cu121 \
  -r packages/huri-module-tts/requirements-nvidia.tts_cosyvoice.txt
pip install -e 'packages/huri-module-tts[cosyvoice]'
packages/huri-module-tts/install_cosyvoice.sh /opt/cosyvoice   # not pip-installable
export HURI_COSY_DIR=/opt/cosyvoice   # the handle puts it and its Matcha-TTS on sys.path
HURI_MODULES=...,tts_cosyvoice ...   # instead of tts; see the env vars in huri_tts/cosyvoice/handle.py

huri hub install tts_cosyvoice (or pip install 'huri-module-tts[cosyvoice]') does only the second line: torch and torchaudio, unpinned. The pins, the CosyVoice checkout and HURI_COSY_DIR stay the steps above (./install.sh --tts-engine cosyvoice does all of them).

Use tts_cosyvoice in place of tts in the server's HURI_MODULES and the client's modules:, and name its Serve deployment CosyVoiceTTSHandle.

A distribution of huri-modules, versioned in its pyproject.toml (see RELEASING.md there). It depends on huri-core and huri-events, which are not on PyPI: without a checkout, install them from git in the same pip command, so pip never looks them up on an index ([cosyvoice] for the other engine):

ref=0.1.0   # a huri-modules release tag
core=0.4.0  # HURI_CORE_REF in that release's versions.env
pip install \
  "huri-core[server] @ git+https://github.com/Lucy-Robotics/huri-core.git@$core" \
  "huri-events @ git+https://github.com/Lucy-Robotics/huri-modules.git@$ref#subdirectory=packages/huri-events" \
  "huri-module-tts[piper] @ git+https://github.com/Lucy-Robotics/huri-modules.git@$ref#subdirectory=packages/huri-module-tts"

Metadata

Release files for huri-module-tts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for huri-module-tts 0.1.0
File Size Uploaded Provenance
huri_module_tts-0.1.0.tar.gz 13.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for huri-module-tts 0.1.0
File Interpreter ABI Platform
huri_module_tts-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / huri_module_tts-0.1.0.tar.gz

Download URL huri_module_tts-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2081cd1d7de783d7f1d4adfa5bc0fb4823ac315cb283d3b6b31ef1606e246ce6
BLAKE2b-256 checksum
How to use checksums
e7e785a8319632f94db58db415551169b510d03de9d8c6d55f965d1e217ac9c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / huri_module_tts-0.1.0-py3-none-any.whl

Download URL huri_module_tts-0.1.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa2b0bdeb38a1c2a69b5ac307c2e79029dbb3bc753c6a3739cf82b84775933c8
BLAKE2b-256 checksum
How to use checksums
684ae027325595b8683b118d26ba41adee2928f93d96acf2d017ff032a907e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for huri-module-tts 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page