Skip to main content

No project description provided

Project description

DeepGrain.AI - TTS Service Client

Install

pip install deep-tts

Usage

import os

from dotenv import load_dotenv

load_dotenv(".env")

from deep_tts import DeepTTS

if __name__ == "__main__":
    access_token = os.getenv("ACCESS_TOKEN") or ""

    # text data to stream
    text_data = ["Hello, ", "this is ", "streamed ", "text ", "data."]
    text_data = ["今天天气不错,", "适合春游。"]

    # Send streamed text data to the server
    tts_client = DeepTTS(access_token)
    response = tts_client.stream_text(text_data)

    print(response.text)
    chunk_id = response.json().get("chunk_id")

    status = tts_client.stream_status(chunk_id)
    print(status.text)

    tts_client.stream_to_file(chunk_id)

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

deep_tts-0.1.18.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

deep_tts-0.1.18-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file deep_tts-0.1.18.tar.gz.

File metadata

  • Download URL: deep_tts-0.1.18.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Darwin/23.4.0

File hashes

Hashes for deep_tts-0.1.18.tar.gz
Algorithm Hash digest
SHA256 2cd1749c5e45a29eb53ab6700eb75ee8f044de62b48bcf2b247f59d82f0cf3a5
MD5 0809f2722fc8e5cbefd60e311b088550
BLAKE2b-256 7e3376b42a67da530bd9e2a99d98b09562ec39bac1144feb57ac8cd99d6c7c81

See more details on using hashes here.

File details

Details for the file deep_tts-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: deep_tts-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Darwin/23.4.0

File hashes

Hashes for deep_tts-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 f5f3d8426ea229695227e35ec2238ad06f096a6904381b625f8491882e335406
MD5 197f0c7a17419053f53eb4d7a0377233
BLAKE2b-256 18e456b6ea9e99cd388cf33ec68bb2f4bfbe417188f635786fb10a5c25b9b0d3

See more details on using hashes here.

Supported by

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