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.15.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

deep_tts-0.1.15-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deep_tts-0.1.15.tar.gz
  • Upload date:
  • Size: 2.8 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.15.tar.gz
Algorithm Hash digest
SHA256 8458e0ec91cebe7a3d7f400e538999cf9b22844ceb640c45740dbd17eae3b1f0
MD5 3359cf3b50e97c56a6232a1c83d29ef8
BLAKE2b-256 5f6bc8a20244730f51eed6787006a6df1eaf1d8765615621c7dc642d5e2fc738

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deep_tts-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 26dbadff1299a57d0bb6f895a6d8958a77ea7e331c50d905abca61889edc4f0e
MD5 3828830f7426eaf23174167777168fd2
BLAKE2b-256 0c0ac5edb6366c81ab28efad45ab4baf42c1a3a7808a3936c380dd06f05e173b

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