Skip to main content

Snorbyte TTS client with streaming and playback

Project description

snorbyte

Snorbyte TTS client with streaming, PCM ring-buffer playback, and ffplay/ffmpeg required for compressed live playback/encoding.

DEPENDENCIES (VERY IMPORTANT)

We require both ffplay and ffmpeg to be available on your system PATH. We also use sounddevice for PCM playback, which depends on PortAudio (OS package) on Linux.

Windows

Option A (winget)

winget install -e --id Gyan.FFmpeg

Option B (chocolatey)

choco install ffmpeg

Verify

After install, ensure the ffmpeg/bin folder is on your PATH.

ffmpeg -version
ffplay -version

Linux

Debian/Ubuntu

sudo apt-get update
sudo apt-get install -y ffmpeg libportaudio2

Verify

ffmpeg -version
ffplay -version

INSTALL PACKAGE

pip install snorbyte

EXAMPLE USAGE

from snorbyte import Snorbyte

def consume_stream(b: bytes):
    # b is raw stream bytes (PCM aligned for fmt="pcm", raw MP3/WAV chunks otherwise)
    print(f"chunk {len(b)} bytes")

client = Snorbyte(
    api_key="<YOUR-API-KEY>",
    endpoint="http://api.snorbyte.com/tts",
)

path, data, info = client.tts(
    utterance="दोस्त, दिल टूटा है तो क्या, रात भर प्लेलिस्ट रोएगी पर सुबह धूप आएगी, खुद से वादा कर—जो गया, जाने दे, जो आएगा, मुस्कुराकर अपनाएंगे।",
    speaker_id=233,
    speaker_name="",
    tone="Encouraging",
    speed=1.00,
    chunk_size=8192,
    denoise=True,
    stream=True,
    stream_bytes_callback=consume_stream,
    fmt="pcm",               # "mp3" | "wav" | "pcm"
    play=True,
    save_to="out.mp3",      # optional; auto-name if omitted
    temperature=0.0,
    top_p=1.0,
    repetition_penalty=1.05,
)

print("Saved to:", path)
print("Bytes in memory:", len(data) if data else None)
print("Info (ms):", info["latency_ms"])

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

snorbyte-0.1.9.tar.gz (159.5 kB view details)

Uploaded Source

Built Distributions

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

snorbyte-0.1.9-cp312-cp312-win_amd64.whl (257.5 kB view details)

Uploaded CPython 3.12Windows x86-64

snorbyte-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (934.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (886.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

snorbyte-0.1.9-cp312-cp312-macosx_10_13_universal2.whl (389.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

snorbyte-0.1.9-cp311-cp311-win_amd64.whl (258.0 kB view details)

Uploaded CPython 3.11Windows x86-64

snorbyte-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (963.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (932.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

snorbyte-0.1.9-cp311-cp311-macosx_10_9_universal2.whl (392.4 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

snorbyte-0.1.9-cp310-cp310-win_amd64.whl (257.4 kB view details)

Uploaded CPython 3.10Windows x86-64

snorbyte-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (910.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (887.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

snorbyte-0.1.9-cp310-cp310-macosx_10_9_universal2.whl (387.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

snorbyte-0.1.9-cp39-cp39-win_amd64.whl (257.8 kB view details)

Uploaded CPython 3.9Windows x86-64

snorbyte-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (926.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (904.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

snorbyte-0.1.9-cp39-cp39-macosx_10_9_universal2.whl (387.9 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file snorbyte-0.1.9.tar.gz.

File metadata

  • Download URL: snorbyte-0.1.9.tar.gz
  • Upload date:
  • Size: 159.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snorbyte-0.1.9.tar.gz
Algorithm Hash digest
SHA256 148a8e750a92ed6f110a66228b5ea13497bfbbc85e81222f8309c3c3942cd435
MD5 7583a2a9cb7ab5a7837eaf8bcffdce6f
BLAKE2b-256 523cc180fd7977d2e7e03cbbd69a76eb061763b37cfe5654369fd80ad8d4a5f8

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: snorbyte-0.1.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 257.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snorbyte-0.1.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2d5cda3d5d0c18b259ad569f2d9328d47b7349260442eb1f77de16fe0e0bb997
MD5 ecaca6e6378834d00ca9363e97610f02
BLAKE2b-256 023f554a5941b6f2bda95d7ed0ba054cfed939b12b2e2adeeb056c354947493a

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a3771b06525bdbdff71a2769f27bde435a71841b83269dfc448dcdfe71c48cb
MD5 1172205dadc32e4c5575f09445e65704
BLAKE2b-256 3f5d7719b4a9c2bb8e58a79845a77604d9e5738d698209c80dff9468400649ac

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 731081063740116cb639ff97d75f020a8daac00b43ab3dd06f02c5ce6a471a37
MD5 f31d321208565c8ec565b0f8f11b6443
BLAKE2b-256 e69833f6324c275897739380f856388af0e2c34213ce6803488d8b8149627568

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f990d61e5244809370c503ca1f7430e21d723f3f88c45e039c87baf8e803630b
MD5 e503073928df6eb75bcdc1666940f0c4
BLAKE2b-256 fb9ebaff2424f91c5dea7d2b8ca7d53c45c310aff2e13091e798aebe62ab4b74

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: snorbyte-0.1.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 258.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snorbyte-0.1.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 47b6ef1f7052dd2ecec708dbfd3af41b4839e363ee0067c659c0e83c2cd6fc95
MD5 a411a52c6d2327651f82268f6b59e705
BLAKE2b-256 5b7588da5fbd876d32af01b5dfb0653ec365cba3c02b7ad21e62fec756eb21d8

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c824f056369b6642b1a8d5b2082c29e69d8096aeaec8b396f8e142f37e2d5cc
MD5 0416d08dc236ed3d3a218dce943f4cfe
BLAKE2b-256 5e702da8954e367dfcd697a13c3ffffc18ac2ada6af91b775a169791e5eeac9e

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9b0c7d7b2c17fc592ac26a5ccdbd4ae9399601a8dc2722db5b7e5915a8d99931
MD5 cbdf7cfed9e989f0a38070dc6161601e
BLAKE2b-256 265eab7e7e414532369c4daafd11468900b210114876dee3681edada136588fb

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4eeca6ea8ba83fab1acdd4ef75efcc39ba8219f8146dc5f3a3ac7a00ed2e7f97
MD5 6b6f1f360dc33f0f4733f6975e4716cd
BLAKE2b-256 5809d39acfe393702a2ed1e390ec9f667b256d68e5b97a8be809bee8911a5f16

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: snorbyte-0.1.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 257.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snorbyte-0.1.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 efcd0a6cb180bf656bb40e77c1109c32f1a62a5cb9d296c4fbd0ed1c76a4038e
MD5 62023a399264199d49737e05db88c554
BLAKE2b-256 a44b318833fb4d17ac0ef604e47409ec864e87b7045f68748789a9c669fcd4cd

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4e30972c1da4320d44f5d17333f89a49d0c8b91d2ab8a18b399dcbfbb16c0f4
MD5 721bdf4a07d77e31b3159bb77b8574a4
BLAKE2b-256 7d310dfa7f54bbf2129460eb39e88fd775de37e682f53839d4d6b4cacb1590ca

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 70ae6d908dbc1f2a6122453d0e88b2943d1f2104cb8e1bb362f24f6ed2116bb2
MD5 3ca702300f0f6eb6b735bf3114be00a5
BLAKE2b-256 db41479daca391d74b44fbaf947a20cdf8953670553f0af4fc403b7f40adf9dd

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0bc33bfa8eb0140c44c3a43f79b10f1916c207da2583f0a8826c5ceb2449ce74
MD5 522d7bedf63c1a8458f56a57454093d5
BLAKE2b-256 e2284ac37e316d7c919610b6f76f5aac286c99022804db5997f0442a76d96223

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: snorbyte-0.1.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 257.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snorbyte-0.1.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3feda6a9ba45c52e798e3ef0fd5814df481df7c5aca2bec3cdd89ba8af89a982
MD5 f9349955c583028a08dd4c85ec52c811
BLAKE2b-256 84d76a2921c9549b37574f56e952777d5088de53bea2895e0b80302abdf37028

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fd6a4dbf3f9aeec55ca9b950a3bb00318d71c6306da8a4e6792b0329705b1ab
MD5 bfa75d533cd4390c47979967f273eadd
BLAKE2b-256 3ac56a591c3367d3fb926af5be533be771a887a8b03c6cf9cfe6225bf507ce8c

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cc9ff5780f871cdbfaee79f7d4d0ebe3c232d90aa75f1ce43a28f705ec997407
MD5 23a8f50f337d9965af5ff46c77b65c36
BLAKE2b-256 91d8e95df09e3b7280d187457de77e7c709a9aa24de8825afb7083724bf0beb3

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 05869e40a2db37f76aab755223420585885f88b7f3ad809daf6e889b315c4962
MD5 adb2b773958c2cf3ae0ce983283ade34
BLAKE2b-256 e2ccf47592c1f4a27897814b974568b30b4d1e87ec8f3a8244bc5842cd329fdf

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