API Documentation for French Text to Voice Integration

By HomeSayer editorial team · Updated 2026-11-18

This documentation provides a practical guide for smart home and IoT product teams integrating HomeSayer’s text-to-speech API. It covers essential workflows for generating consistent, multilingual audio outputs for your devices, dashboards, or apps. You will find concrete examples for authenticating, sending requests, and handling responses without managing complex audio pipelines.

We focus on standard HTTP methods and JSON bodies compatible with existing tools. The guide explains how to select voices, specify languages, and manage rate limits for reliable deployment. Whether you are building a voice assistant or an audio notification system, these steps ensure you can generate synthetic speech efficiently and accurately.

API Documentation for French Text to Voice Integration

Frequently asked questions

What is an API key?

An API key authenticates your requests to the HomeSayer TTS service. It is a string starting with 'tts-...' included in the Authorization header. Each account has one active key. You can issue a new key at any time, which immediately invalidates the previous one, ensuring secure access control for your smart home integrations.

How do I get my API key?

Sign up on the /get-api-key/ page using Google or an email and password. After signing in, the dashboard displays your unique API key, current balance, and usage statistics. Accounts created with email and password start without trial credit, while Google sign-ins receive $0.50 valid for 7 days.

What is the base URL?

The API base URL is https://api.playyy77.com/v1. All requests, including the speech generation endpoint and voice listing, use this domain. You must configure your client or SDK to send POST requests to https://api.playyy77.com/v1/audio/speech with the appropriate JSON body and authentication headers.

How do I use the OpenAI SDK?

The API matches the OpenAI speech endpoint shape. Use the official OpenAI SDK by changing the base_url to https://api.playyy77.com/v1. Pass your HomeSayer API key as the API key. The SDK handles the request structure, allowing you to generate audio files using standard methods without custom HTTP logic.

What models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and price. You can list available models by sending a GET request to /v1/models. The choice between models does not affect the cost, which is $10 per 1 million characters, but may affect audio quality preferences.

What is the difference between tts-1 and tts-1-hd?

Both models use the same engine and have identical pricing of $10 per 1 million characters. The primary difference is audio fidelity, with tts-1-hd offering higher quality. For smart home devices where bandwidth is limited, tts-1 is often sufficient. Both support the same voices, languages, and response formats.

How do I set the language?

Include the 'language' field in your JSON body with an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, always set the language explicitly to ensure accurate synthesis across the 23 supported languages.

What audio formats are supported?

Supported formats are mp3, wav, opus, flac, and pcm. Specify the desired format using the 'response_format' field in your request. MP3 and Opus are efficient for network transmission to IoT devices, while WAV and FLAC offer lossless quality. PCM provides raw audio data for specific hardware requirements.

What is the rate limit?

The limit is 60 requests per minute per key. Before the first top-up, the limit is 10 requests per minute. If you exceed the limit, requests may be queued or rejected. Monitor your usage via the dashboard to ensure consistent performance for your smart home voice features.

How do I handle errors?

Check the HTTP status code and response body for error details. Failed synthesis requests are free, and the charge is returned in full. Ensure your text is under 4096 characters and your key is valid. Use standard HTTP error handling in your integration code to manage transient issues gracefully.

How do I generate audio for long texts?

Split your text into parts of up to 4096 characters. Generate audio for each part separately using the API. Then, join the resulting audio files in your application logic. This approach ensures each request stays within the character limit.

What is the speed parameter?

The speed parameter controls the playback speed, ranging from 0.25 to 4.0. The default is 1.0. Adjusting speed allows you to match the voice output to your device’s context, such as faster instructions or slower storytelling. Values outside this range may result in errors or unexpected audio quality.

Can I use the same key for multiple projects?

Yes, one active key per account can be used across multiple projects. The rate limit of 60 requests per minute applies to the key, not individual projects. If you need higher throughput, you can issue a new key, which invalidates the old one immediately.

How do I rotate my key?

Issue a new key from your dashboard at any time. The new key becomes active immediately, and the old one stops working at once. Update your applications to use the new key. This ensures secure access without downtime, as the old key is invalidated instantly upon rotation.

First request

curl

curl https://api.playyy77.com/v1/audio/speech \
  -H "Authorization: Bearer $TTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tts-1","voice":"aria","input":"Hello from the API.","response_format":"mp3"}' \
  --output hello.mp3

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.playyy77.com/v1", api_key="tts-...")

with client.audio.speech.with_streaming_response.create(
    model="tts-1", voice="nova", input="Hello from Python.", response_format="mp3"
) as response:
    response.stream_to_file("hello.mp3")

Node.js (openai)

import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({ baseURL: "https://api.playyy77.com/v1", apiKey: process.env.TTS_API_KEY });
const res = await client.audio.speech.create({ model: "tts-1", voice: "milo", input: "Hello from Node.js." });
fs.writeFileSync("hello.mp3", Buffer.from(await res.arrayBuffer()));
voice
ariafemale
novafemale
lunafemale
sagefemale
felixmale
milomale
atlasmale
orionmale
language
arالعربية
zh中文
daDansk
nlNederlands
enEnglish
fiSuomi
frFrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
itItaliano
ja日本語
ko한국어
msBahasa Melayu
noNorsk
plPolski
ptPortuguês
ruРусский
esEspañol
swKiswahili
svSvenska
trTürkçe

Authentication and Keys

Sound wave illustration for: Authentication and Keys

Access the HomeSayer API by generating a unique key on the /get-api-key/ page. You can sign up using Google or an email/password combination. Your dashboard displays the active key, current balance, and usage metrics.

Generating Your API Key

Generating Your API Key

Navigate to the sign-up page to create your account. Google sign-ins receive a $0.50 trial credit valid for 7 days. Email accounts start without trial credit. You can top up later via USDT on the TRON network.

Bearer Token Authorization

Bearer Token Authorization

Include your key in the HTTP header as Authorization: Bearer tts-.... Ensure the key is sent with every request to the https://api.playyy77.com/v1 endpoint. Incorrect or missing keys will result in a 401 Unauthorized error.

  • Use the exact format: Authorization: Bearer tts-<your_key>
  • One active key per account.

Key Rotation and Invalidation

Issue a new key from your dashboard at any time. The previous key stops working immediately upon generation. This allows for secure rotation without service interruption. Old keys cannot be restored once invalidated.

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

Use cURL to send your first synthesis request to the HomeSayer API. This method requires no external dependencies and works directly from your terminal or CI/CD pipeline.

First POST Request

Send a POST request to https://api.playyy77.com/v1/audio/speech. Include your API key in the Authorization header and the text to convert in the JSON body.

  • Endpoint: POST https://api.playyy77.com/v1/audio/speech
  • Header: Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

Required JSON Body Fields

The request body must include model, input, and voice. You may also specify response_format and speed.

  • model: "tts-1" or "tts-1-hd"
  • input: Text string (max 4096 characters)
  • voice: One of 8 presets (e.g., "aria", "atlas")
  • response_format: "mp3", "wav", "opus", "flac", or "pcm"

Response Handling

On success, the API returns the audio file directly in the response body with a 200 OK status. Ensure your client handles binary data correctly. Failed requests return an error JSON and are free.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

The HomeSayer TTS API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing client code with minimal changes. By pointing your SDK to the HomeSayer base URL, you can generate audio directly using familiar methods without rewriting your integration logic.

Setting the Base URL

Configure your SDK client to use https://api.playyy77.com/v1 as the base URL. This single change redirects all speech requests to the HomeSayer infrastructure while maintaining the standard OpenAI request shape.

Using Official SDKs

Any official OpenAI SDK works seamlessly with HomeSayer. Simply initialize the client with your tts-... API key and the adjusted base URL. You can then call the speech endpoint exactly as you would for OpenAI models.

Compatibility Notes

While the request shape is identical, note that HomeSayer does not offer the official OpenAI SDK itself. You must use the third-party OpenAI SDKs directly. SSML is not supported.

Request Parameters

Sound wave illustration for: Request Parameters

Configure the synthesis behavior by selecting the model, voice preset, and target language. Each parameter directly influences the audio output characteristics and must be included in the JSON body of your POST request to the speech endpoint.

The model determines the engine quality, while the voice preset defines the speaker’s tone. Accurate language specification ensures correct pronunciation, especially for Latin-script texts that do not default to English.

Model Selection (tts-1 vs tts-1-hd)

Both "tts-1" and "tts-1-hd" use the same underlying engine and incur identical pricing. The choice depends on whether your smart home device prioritizes computational efficiency or higher audio fidelity.

Since pricing is identical, you can swap models without adjusting your integration logic. Use "tts-1-hd" for premium user interfaces and "tts-1" for background notifications or high-volume IoT deployments.

  • "tts-1": Standard quality, lower CPU usage.
  • "tts-1-hd": Higher fidelity, suitable for prominent voice feedback.
  • Same price: $0.01 per 1,000 characters for both options.

Voice Preset Options

Select from eight licensed presets that cover various communication styles, from warm narration to neutral news delivery. Each voice is designed for specific use cases, such as instructional guides or conversational prompts.

All voices support all 23 languages. Choose based on your device’s personality: "sage" for calm instructions, "felix" for energetic promos, or "atlas" for neutral status updates.

  • "aria": Warm, clear narrator.
  • "nova": Bright, upbeat.
  • "luna": Soft, storytelling.
  • "sage": Calm, instructional.
  • "felix": Energetic, promo.
  • "milo": Friendly, conversational.
  • "atlas": Neutral, news.
  • "orion": Deep, documentary.

Language Code Specification

Provide the ISO 639-1 language code to ensure accurate pronunciation, particularly for non-English texts in Latin script. Without this, the system defaults to English for Latin characters.

Setting the language explicitly prevents mispronunciation in multilingual smart home environments. Supported languages include Arabic, Chinese, French, German, Japanese, Spanish, and others listed in the /v1/voices endpoint.

  • Default: English for Latin script.
  • Explicit code required for other languages.
  • Supported: 23 languages including French, German, Spanish, Japanese.

Response Formats

Sound wave illustration for: Response Formats

Receive synthesized audio instantly via the response body. The API returns binary audio data or a base64-encoded string, depending on your client implementation. This direct delivery mechanism ensures minimal latency for smart home device audio playback or app notifications.

Supported Audio Formats

Choose from five standard formats: MP3, WAV, OPUS, FLAC, and PCM. Select the format that best balances quality and bandwidth for your IoT devices. MP3 offers efficient compression for network streaming, while WAV and FLAC provide lossless quality for high-fidelity speakers.

  • MP3: Compressed, widely supported
  • WAV: Uncompressed, high quality
  • OPUS: Efficient for low bandwidth
  • FLAC: Lossless compression
  • PCM: Raw uncompressed audio

MP3, WAV, OPUS, FLAC, PCM

Each format serves specific hardware constraints. Use PCM for simple embedded systems that require raw data. FLAC is ideal for archival or high-end audio systems. OPUS is recommended for voice assistants where data efficiency matters.

Audio Delivery

The audio is returned directly in the HTTP response body. There is no persistent storage or separate download link. Your application must handle the binary stream immediately upon receipt. This synchronous delivery ensures you have the audio file ready for playback without additional API calls.

Response Formats

Rate Limits and Errors

Sound wave illustration for: Rate Limits and Errors

HomeSayer enforces a rate limit of 60 requests per minute per API key. For new accounts, this limit is initially stricter at 10 requests per minute until the first top-up is processed.

Requests Per Minute Limit

Each API key is capped at 60 requests per minute. New keys start with a 10 requests per minute limit, which increases to the full 60 RPM after your first top-up of at least $5 USDT on the TRON network.

Common HTTP Error Codes

Standard HTTP codes indicate request status. Use 401 for invalid or expired keys, 400 for malformed JSON or missing fields, and 429 when you exceed the per-minute quota.

  • 401 Unauthorized: Invalid Bearer token.
  • 400 Bad Request: Invalid model or voice parameter.
  • 429 Too Many Requests: Quota exceeded.

Handling Rate Limit Exceeded

When the limit is reached, the API returns a 429 status code. Implement exponential backoff in your integration to retry requests automatically. Top-ups instantly raise the limit for new keys.

Advanced Usage

Sound wave illustration for: Advanced Usage

The API allows precise control over speech tempo via the speed parameter, accepting values from 0.25 to 4.0. This flexibility helps smart home devices deliver clear instructions without sounding robotic or rushed, ensuring optimal user experience across different environments.

For texts exceeding the 4096-character limit, you must split the input into smaller chunks. Requests are processed one after another, so under load a request may wait in a queue. Join the resulting audio files client-side to maintain continuity.

Speed Control (0.25–4.0)

Adjust the speed parameter to match your device's context. Slower speeds (e.g., 0.5) improve clarity for complex notifications, while faster settings (up to 4.0) suit brief status updates.

The default speed provides a balanced narration style suitable for most voice assistant interactions.

Handling Long Texts

Send texts up to 4096 characters per request. For longer content, divide the text into segments that fit this limit.

Generate audio for each segment individually, then concatenate the files in your application logic.

Character Splitting Strategy

Split text at natural boundaries, such as sentence ends or paragraph breaks, to ensure coherent audio segments.

Monitor request timing; generation is roughly real-time, but queue delays may occur during peak usage. Buffer your audio segments to prevent playback gaps.

Voices and Languages Endpoint

Sound wave illustration for: Voices and Languages Endpoint

The /v1/voices and /v1/models endpoints allow your smart home devices to query available synthesis options directly. This ensures your IoT firmware stays synchronized with supported languages and voice presets without hardcoding values.

Use GET /v1/voices to retrieve the full list of 8 voice presets and 23 supported languages. GET /v1/models returns the current model versions, typically "tts-1" and "tts-1-hd".

GET /v1/voices

Call this endpoint to retrieve all available voice presets (e.g., aria, nova, atlas) and their supported languages. The response includes ISO codes for the 23 supported languages, such as French, German, and Spanish, allowing your device to select the correct voice dynamically.

This data helps you configure your app’s language selector or determine which voice matches the device’s regional setting.

  • Returns a JSON array of voice objects.
  • Each object includes the voice name, gender, and supported language codes.
  • Use this to map user preferences to specific voice IDs.

GET /v1/models

Retrieve the available TTS models, currently "tts-1" and "tts-1-hd". Both models use the same engine and pricing structure, so you can choose based on quality needs or simply default to "tts-1" for consistency.

This endpoint ensures your integration works even if new models are added later.

  • Returns a list of model IDs.
  • Both models support all voices and languages.
  • Pricing is identical for both models.

Listing Available Options

Combine these endpoints to build a robust language selection interface for your smart home dashboard. Fetch voices once during setup or when a user changes the device language.

Cache the results locally in your IoT device to reduce API calls, as the list of voices and languages changes infrequently.

  • Cache responses to minimize network usage.
  • Update the voice list if the user changes the device’s primary language.
  • Verify language support before sending synthesis requests.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Short phrases may take a few seconds to synthesize, while longer texts process at a steady pace.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. OpenAI API reference: create speech
  3. ISO 639 language codes
  4. W3C WAI: making audio and video accessible
  5. openai-python on GitHub
  6. Python documentation
  7. LibriTTS-R corpus (OpenSLR 141)
  8. FFmpeg documentation
  9. Node.js documentation
  10. Creative Commons Attribution 4.0
  11. IETF RFC 7845: Ogg Opus
  12. Tether (USDT)

More on this site