Skip to main content

Official 60db SDK for Python

Project description

60db

Official 60db SDK for Python

Installation

pip install 60db

Quick Start

from sixtydb import SixtyDBClient

client = SixtyDBClient('your-api-key')

# Text to Speech
audio = client.text_to_speech(
    'Hello, world!',
    voice_id='default-voice',
    speed=1.0  # 0.5 to 2.0 (default 1.0)
)

# Save audio
with open('output.mp3', 'wb') as f:
    f.write(audio)

# Get all voices
voices = client.get_voices()

API Methods

Text-to-Speech

  • text_to_speech(text, voice_id=None, **params) - Convert text to speech

Speech-to-Text

  • speech_to_text(audio_file, language=None) - Transcribe audio
  • get_languages() - Get supported languages

Voices

  • get_voices() - List all voices
  • get_voice(voice_id) - Get specific voice

Examples

Streaming TTS

def handle_chunk(chunk):
    print(f"Received {len(chunk)} bytes")

client.text_to_speech_stream(
    "This is streaming audio",
    on_chunk=handle_chunk,
    on_complete=lambda: print("Done!"),
    voice_id='default-voice'
)

Speech to Text

with open('audio.mp3', 'rb') as f:
    result = client.speech_to_text(f, language='en')
    print(result['text'])

License

MIT

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

sixtydb_python-1.0.5.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

sixtydb_python-1.0.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file sixtydb_python-1.0.5.tar.gz.

File metadata

  • Download URL: sixtydb_python-1.0.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sixtydb_python-1.0.5.tar.gz
Algorithm Hash digest
SHA256 e3b2d067434aa27d479553d4e4a9b61433235f338fc2dc1e32d82b2bc399db8e
MD5 a32c469631071173c9d6cf8260affc48
BLAKE2b-256 5d76db61b703e7fee66de8e7c763e93c23283e59e5d725a09f0ad91718f31224

See more details on using hashes here.

File details

Details for the file sixtydb_python-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: sixtydb_python-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sixtydb_python-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 abee280e4c36d8089ab0f90ae44cb4cc53330fd1afe0d661bf4afa46d8962951
MD5 590706465fd2ded5d0f2a7999b54fcb9
BLAKE2b-256 a09c5dc6dbc9f13851b3c5973f00fb3275b4d47048508da814037702d4bbbc6b

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