Skip to main content

PyPI Python License: MIT

Installation

pip install voicelab-sdk

Initialization

import os

from voicelab import VoiceLab

client = VoiceLab(api_key=os.environ["VOICELAB_API_KEY"])

Generate speech

speech = client.tts.synthesize(
    text="Hello from VoiceLab.",
    language="en",
    voice_id="voice_01J9NEUTRAL0000000000000001",
)

with open("speech.wav", "wb") as audio_file:
    audio_file.write(speech.audio)

Transcribe audio

result = client.stt.transcribe(audio="meeting.mp3", language="en")

if result.transcript is not None:
    print(result.transcript)

Stream speech

with client.realtime.connect_text_to_speech() as stream:
    stream.synthesize(
        text="This audio arrives as PCM chunks.",
        language="en",
        voice_id="voice_01J9NEUTRAL0000000000000001",
    )
    for message in stream:
        if isinstance(message, bytes):
            playback_queue.put(message)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voicelab_sdk-0.1.0.tar.gz (92.4 kB view details)

Uploaded Source

Built Distribution

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

voicelab_sdk-0.1.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: voicelab_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 92.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for voicelab_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3bf10b9c9eacefcc39d42f730193e446c58abc81fc5dee316aec8977340752c
MD5 2bbccd80fca3137b6e7190377e4dc7c2
BLAKE2b-256 0cd294108b0a4c1e5b1f7db4849b789d1443b2f88a638b716799fbf10e081d4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: voicelab_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for voicelab_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92fbe288a9627b0784b2057869f87b500cada359eb30e6f0b7042f21bd6b2081
MD5 21da917eece66330ab8863e1a9e19694
BLAKE2b-256 ef759c482a402b9c4022eeb1f9fae249781d00a31289389fd44da2d689909b30

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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