Skip to main content

Vocence voice plug-ins — drop custom-cloned voices and streaming speech recognition into your real-time voice agents.

Project description

vocence-plugins

Vocence voice plug-ins for real-time agent pipelines — drop in Vocence custom voices for TTS and Vocence streaming speech recognition for STT.

  • VocenceTTS — streaming text-to-speech with the Vocence voice library (cloned, designed, and built-in speakers). One persistent connection per session, sub-second TTFB on warm connections, PCM16LE @ 24 kHz output.
  • VocenceSTT — streaming speech-to-text with interim + final transcripts, optional speech / silence events for VAD integration, and language auto-detect.

Status: 0.1.0 — public alpha.

Install

pip install vocence-plugins

The plug-ins conform to the standard TTS / STT abstract interfaces, so they slot into any compatible voice-agent framework.

API key

Get one at https://www.vocence.ai/account/developer. Requires the Premium plan.

export VOCENCE_API_KEY=voc_live_...

Or pass it directly: VocenceTTS(api_key="voc_live_...", voice="...").

Quickstart

from vocence_plugins import VocenceTTS, VocenceSTT

tts = VocenceTTS(voice="design-aria", language="English")
stt = VocenceSTT(language="English")

# Wire into your agent pipeline as the TTS / STT components.

The plug-ins handle the WebSocket lifecycle, reconnection, and audio framing — your code just sees text in and audio out (TTS), or audio in and transcript events out (STT).

Plugin reference

VocenceTTS(*, api_key=None, voice, language=None, base_url=...)

Streaming TTS over the Vocence voice service. One WebSocket reused across many synthesize() calls in the same session, closed on aclose().

Arg Default Notes
api_key VOCENCE_API_KEY env Required (voc_live_…).
voice Required. Either a built-in slug ("design-aria", "design-jasper", …) or the numeric id of a saved designed / cloned voice.
language None Optional hint sent on every speak.
base_url https://api.vocence.ai Override for staging / self-hosted.

Audio output: PCM16LE @ 24 kHz, mono.

VocenceSTT(*, api_key=None, language="auto", sample_rate=16000, enable_partials=True, vad_events=True, base_url=...)

Streaming STT. Lazy-opens a WebSocket on the first audio frame, runs a background reader that translates events into the framework's standard transcript event shape (interim, final, speech-start, speech-end).

Arg Default Notes
api_key VOCENCE_API_KEY env Required.
language "auto" ISO-639-1 ("en"), full name ("English"), or "auto". Normalized to ISO before send.
sample_rate 16000 PCM16LE mono input.
enable_partials True Stream interim hypotheses as the model refines.
vad_events True Emit speech-start / silence events from the internal VAD.

Compared to the Vocence Python SDK

Use case Use
Talk to a Vocence-hosted voice agent (REST + WebSocket to our service) vocence
Build your own agent pipeline with Vocence voices + recognition This package

The two don't overlap — different products for different use cases. Both authenticate with the same voc_live_… key.

License

Apache-2.0.

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

vocence_plugins-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vocence_plugins-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file vocence_plugins-0.1.0.tar.gz.

File metadata

  • Download URL: vocence_plugins-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for vocence_plugins-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a349bf1556e0c3db770c9b09fc36e9ab9e1b7331aefef5354b5eb194658b152
MD5 d1677a25856f1a50bd6dacfb0fedb677
BLAKE2b-256 630cfcb27bd6a13159bfcfa43de71c74ebdeaf82e5a4cbdeecf80aeeab9145c3

See more details on using hashes here.

File details

Details for the file vocence_plugins-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vocence_plugins-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79358e84e40626cf3da3e726be748d942d2f37fdf76d21c8784b3f5e4cd80181
MD5 1d0b9e08e2be1495bb2d0f1e2d243270
BLAKE2b-256 0cf7134aa2209710e015b5c15d3fdd35e16800fc076c206d44d6dad9caecca1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page