Metadata-Version: 2.1
Name: deep-tts
Version: 0.1.15
Summary: 
Author: xfeng
Author-email: it.support@deepgrain.ai
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: fastapi (>=0.110.0,<0.111.0)
Requires-Dist: openai (>=1.14.3,<2.0.0)
Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: tiktoken (>=0.6.0,<0.7.0)
Requires-Dist: uvicorn[standard] (>=0.29.0,<0.30.0)
Description-Content-Type: text/markdown

# DeepGrain.AI - TTS Service Client

## Install

`pip install deep-tts`

## Usage

```python
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)

```

