Skip to main content

Gandr Tool

This tool allows Agents to use the Gandr text-to-speech API to create audio files from text. API keys are managed at https://gandr.ai and the free tier is 50,000 tokens.

Usage

from llama_index.tools.gandr import GandrToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

speech_tool = GandrToolSpec(api_key="gnd_your-key")

agent = FunctionAgent(
    tools=speech_tool.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)
print(
    await agent.run(
        'Create speech from the following text "Hello world" and output the file to "speech.mp3"'
    )
)

text_to_speech: Takes an input string and saves the synthesized audio to a file get_voices: Lists the available Gandr voice names

The tool POSTs to https://tts.gandr.ai/v1/audio/speech with a Bearer key. The key can also be provided through the GANDR_API_KEY environment variable.

Details:

  • Voices: gandr-mia, gandr-ava, gandr-jenny, gandr-dane, gandr-leo, gandr-lewis
  • Formats: mp3 (default), wav, pcm. pcm is headerless s16le mono at 24000 Hz.
  • Input is capped at 2000 characters per request; the tool validates this client side.
  • 23 languages are supported.
  • Every render is watermarked.

This loader is designed to be used as a way to load data as a Tool in a Agent.

This tool has a more extensive example usage documented in a Jupyter notebook here

Metadata

Release files for llama-index-tools-gandr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-gandr 0.1.0
File Size Uploaded Provenance Actions
llama_index_tools_gandr-0.1.0.tar.gz 4.8 kB Without provenance Details for llama_index_tools_gandr-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-gandr 0.1.0
File Interpreter ABI Platform Actions
llama_index_tools_gandr-0.1.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_gandr-0.1.0-py3-none-any.whl

Total release size: 9.2 kB

Release files / llama_index_tools_gandr-0.1.0.tar.gz

Download URL llama_index_tools_gandr-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9885058c74755fe6a7281e138cb7cc97810de7c6b3ae775f27444a28683f67a
BLAKE2b-256 checksum
How to use checksums
e011c50137113aaecac51cb0be1962c4b26fda559623f1146ea1c335b7d68edc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / llama_index_tools_gandr-0.1.0-py3-none-any.whl

Download URL llama_index_tools_gandr-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79e5830ef33d0ab7ecc4f208d54d429c3bb37fa8c26c8e7b521289729761307e
BLAKE2b-256 checksum
How to use checksums
022f2cca402d720a420ffcf10c5b49386061fef91138b42c35b6acaa76b2fe73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for llama-index-tools-gandr 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page