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.1.tar.gz (173.0 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.1-cp313-cp313-win_amd64.whl (279.8 kB view details)

Uploaded CPython 3.13Windows x86-64

snorbyte-0.1.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (996.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (945.4 kB view details)

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

snorbyte-0.1.9.1-cp313-cp313-macosx_10_13_universal2.whl (418.2 kB view details)

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

snorbyte-0.1.9.1-cp312-cp312-win_amd64.whl (279.7 kB view details)

Uploaded CPython 3.12Windows x86-64

snorbyte-0.1.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (949.0 kB view details)

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

snorbyte-0.1.9.1-cp312-cp312-macosx_10_13_universal2.whl (420.4 kB view details)

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

snorbyte-0.1.9.1-cp311-cp311-win_amd64.whl (280.1 kB view details)

Uploaded CPython 3.11Windows x86-64

snorbyte-0.1.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view details)

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

snorbyte-0.1.9.1-cp311-cp311-macosx_10_9_universal2.whl (424.6 kB view details)

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

snorbyte-0.1.9.1-cp310-cp310-win_amd64.whl (279.5 kB view details)

Uploaded CPython 3.10Windows x86-64

snorbyte-0.1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (982.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (958.7 kB view details)

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

snorbyte-0.1.9.1-cp310-cp310-macosx_10_9_universal2.whl (419.1 kB view details)

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

snorbyte-0.1.9.1-cp39-cp39-win_amd64.whl (279.7 kB view details)

Uploaded CPython 3.9Windows x86-64

snorbyte-0.1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (997.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

snorbyte-0.1.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (972.7 kB view details)

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

snorbyte-0.1.9.1-cp39-cp39-macosx_10_9_universal2.whl (420.4 kB view details)

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

File details

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

File metadata

  • Download URL: snorbyte-0.1.9.1.tar.gz
  • Upload date:
  • Size: 173.0 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.1.tar.gz
Algorithm Hash digest
SHA256 e43b52c987324fe67e3aaed367dc4f7b24792d92d2d6e5c055f8dc05a5533836
MD5 e5eb428d2ba0bb90ae9d6a75aaa6e72c
BLAKE2b-256 79ceec9d6cfdd19db1fa8b1ac58d86b4c2e3d80707462a152fce3521674499a6

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: snorbyte-0.1.9.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 279.8 kB
  • Tags: CPython 3.13, 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cbdee8c7456b182826b68fe3a4dcb15329d2c8d809c092a41d9e593a6fe00387
MD5 ea1f57c04e73053120d6d891e87f3e8f
BLAKE2b-256 079fe28307cf18e51f1ac8cb32b1ac432ad9b9cb675d1be70c5f1426531cba18

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad505551f1f6b1fe47c8f736dc685f37573d1a2e63e5f7546aea9d30b60d89af
MD5 7640868dc3304df7c2b7e002b18cd05f
BLAKE2b-256 47b49696785d17152ce96ee7f5617ada9ce68b0078bc94c96e0942e1d0e0e399

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d2a1834c07eecd9d21869f39177cdeebbbce4826ffff66726a67f3e132a81fd3
MD5 8910db2e1f04e1f995d1c29fce11644d
BLAKE2b-256 aa2c836305ea0c457d0d312d892f47b87cdefcb75e28747e365bc1492cfb71ed

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b86042bfdfc19f078337b87982b933482dcd41f5ecf0e9bf8a49be83ce98ac35
MD5 248bb1a5da2c579745732afa40555054
BLAKE2b-256 49f4835d8031e67590719fcd7a556ca830766efd7af6dda47abb6cce39350f09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snorbyte-0.1.9.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 279.7 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b1bcc48187223959b8aaf3c391653ce8233f01d5f3aef2f00d39194c327b1411
MD5 3169aa9d05294241f39a29a6556e048b
BLAKE2b-256 af37eb2555d85cceaf9543826fdc445ab516926ba65102b45264fe1ccb2291da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f617b2c86699efa403e1dc1ca71318f750890e1a12bea7368d912a2682978e8d
MD5 699a45932e446880e797c655b147b4f3
BLAKE2b-256 ef7f9ae97cdfcf2f9361e018db06f89ba69c030c8a9d8f644d50784c792df9a8

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-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.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7b28f88733e7fb3ca2c0dbced97eb331a3e49c6651e6d2905709f11e90741cf5
MD5 92b81429c66075fbbd865a69fa161d18
BLAKE2b-256 57231a70e44bf300e2f4b06bc74dc4050ee8b65c2b9369808212ec79dba99004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9549c9fac67cf8f1409c12b71dd2cdf80a22864be9153f57214220d573ddc54c
MD5 43ac4dfd89da0a98bb2111a3a61b8d1a
BLAKE2b-256 8fea560b6535730b860dacd6884ccfbb1a0eeb0e4b67c4af19befc17e56ebaa8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snorbyte-0.1.9.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 280.1 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 99328c577dc8315945a6d7e3f794a4a79b0e1168a387abf44a1372895ebc06f4
MD5 4a6f31e2d1ca31e82d7de28792936139
BLAKE2b-256 25a2c4262578a889e336daa210ecb11662c4c816d9e02bdbcc2e47d4dd7724ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87f407991dc80af7486dd5444c1cdcf16330331435e936a5b6e64e66900f443a
MD5 dd4b7468f1ab8bf0db953a80852693ab
BLAKE2b-256 eaa6d961f6e068b12d16c2ea8961778b321bc275ad0f55285f8964e8b8a52ec1

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-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.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 457ad102809a2e9d8e1a0806f31d6e1b13711836e72f5d635596357682a6095e
MD5 06dd631d7e184dadda9205a35b13d6dc
BLAKE2b-256 e8cb11b72de1904909f3ea07955c2010b33e68b83cceb9b51a0f9596ef9ab047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a77ebb333bce3ff61963ee918e6e7376ca9dcab869f89fa70df2d6bb95205df3
MD5 c7c7a502f27b222d073d82684fd568f1
BLAKE2b-256 18dd633534e92f1cb9595b1068d00c24133f7b35d6144d5dee87102264fc3c60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snorbyte-0.1.9.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 279.5 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 55c8cf64be52edaa9c520d63d1ac2dff653231311fbd3114554e7334d969ec1b
MD5 9a94d69677f4aadc5d948c149d658d22
BLAKE2b-256 afd81319da9964d311981ab52b8f724505f6f7b8e08fe4ce26998ed35d922f72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d9e35688e4211dde9de0b768bb60e62c543109b427036ba25ba0f00b43e6992
MD5 9337de5a041b2f8e89c627ef6f784eb6
BLAKE2b-256 1b268f55b3b642723d82bb0691d9934b6a5663fcdaf5d4c9ef8607d340e11e7f

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-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.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0464cfa121c2f738eb37fce96420b10979982acf79a86ea9be822f8c1768750f
MD5 701c982afcd8716b5e4f841a6f69af33
BLAKE2b-256 3ad13fa2cfe7c0c103fd31a79de5f23aba9a8ad1c4b7f2a088911df9381b8c23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1d3a970bd00838d7ce64fdb25cfd3a86778d7fe42c9d24cfc8b25f8ea4c731ed
MD5 c7ae13e84ab84722f5ed52c93685ce97
BLAKE2b-256 105a36c50e6a5ea7759c7ecdb329be935f5a71a37584008dbb6a3f3d6f0cc669

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snorbyte-0.1.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 279.7 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7f11ddada7d902ddded98b7898db59179ac1aa8b7184547ae5fff9a0562d9f3e
MD5 ebe808ce24a1492a7c6c09174475a516
BLAKE2b-256 eedb1cbcc15cad8550f6add8ee2e091446c72d2d6fedc226bec0bccb1b7a912f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 52dff16ceb7adad21666bae260e3cbc67ae34f56c42e099fe58f09867b2d8488
MD5 75136c79cdfb5ec6cdb5fe595cfaa172
BLAKE2b-256 1083c6a166dab6cb05a47e8fa61b5cd5ec2301a0e22a63cdd1a3b469799ef844

See more details on using hashes here.

File details

Details for the file snorbyte-0.1.9.1-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.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 18afef8c01cd6872dfff4308c16054e1b22fa241b5a8d98f631bb59d962a96f7
MD5 2e95f46191a4e1644cf4e500e9bd24cf
BLAKE2b-256 23be43765c92f6f6673d9b9f8cfca10f637d30bf54564e6f514a444c313a4745

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snorbyte-0.1.9.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0e17ae38cb735bf5ce95cf6eebc493fd2f24203802351a347198a6aabae6cbbd
MD5 2f931b3614e9c26b64412b94a58fbc14
BLAKE2b-256 f4814515a99f15e47378e98576618148a3f12c8191e6f6e4ac2b6e48a5a5c7b9

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