Catalog PyPI
Back to packageRELEASE DETAILS

1.0.8

PyPI

60db

Official 60db SDK for Python

60dbaisttttsvoice
Published19 Feb 2026
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 1.0.8 documentation

60db

Official 60db SDK for Python

Installation

pip install 60db

Quick Start

from sixtydb import SixtyDBClient


def fetch_and_display_voices(client: SixtyDBClient) -> str:
    """
    Fetch all available voices and print their details.

    Returns:
        str: Selected voice_id
    """
    try:
        response = client.get_voices()
    except Exception as exc:
        print("Error fetching voices:", exc)
        raise

    if not response.get("success"):
        raise Exception(response.get("message"))

    voices = response["data"]["built_in_voices"]

    if not voices:
        raise Exception("No voices available.")

    print("\nAvailable Voices:\n" + "-" * 40)

    for voice in voices:
        print(
            f"Name: {voice.get('name')} | "
            f"Voice ID: {voice.get('voice_id')} | "
            f"Language: {voice.get('language_name')} | "
            f"Gender: {voice.get('gender')}"
        )

    return voices[0]["voice_id"]


def generate_speech(client: SixtyDBClient, voice_id: str) -> None:
    """
    Generate speech and save to file.
    """
    try:
        audio = client.text_to_speech(
            text="Hello, world!",
            voice_id=voice_id,
            speed=1.0
        )

        with open("output.mp3", "wb") as file:
            file.write(audio)

        print("\nAudio saved to output.mp3")

    except Exception as exc:
        print("Error generating speech:", exc)
        raise


def main() -> None:
    try:
        client = SixtyDBClient("your-api-key")
    except Exception as exc:
        print("Error creating client:", exc)
        return

    try:
        voice_id = fetch_and_display_voices(client)
        generate_speech(client, voice_id)
    except Exception as exc:
        print("Operation failed:", exc)


if __name__ == "__main__":
    main()

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

Example: Speech to Text

from sixtydb import SixtyDBClient

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

try:
    with open("output.mp3", "rb") as file:
        result = client.speech_to_text(file, language="en")

    if result.get("success"):
        print("Transcription:", result["data"]["text"])
    else:
        print("STT Error:", result.get("message"))

except Exception as exc:
    print("Error during transcription:", exc)

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.28.0runtime
typing-extensions
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
typing-extensions>=4.0.0runtime

Distribution files

2 collected
60db-1.0.8-py3-none-any.whl

bdist_wheel · 4.89 KB · Python py3

Source file
60db-1.0.8.tar.gz

sdist · 4.86 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:cd2e0228686e95b7c17264bfb0638264b72d75a09b5703bec81483035f4b7835

Other collected versions

View all collected versions →