Generate Spanish Transport Announcements with Loboki TTS

By Loboki editorial team · Updated 2026-11-19

Loboki provides a reliable text-to-speech API designed for indie developers building public transport announcements and multilingual information systems. This page details how to generate clear, consistent audio for station broadcasts, route updates, and safety instructions using predictable latency and simple integration.

You will find concrete examples of voice selection for different announcement types, technical integration steps using the OpenAI SDK, and performance metrics for real-world deployment. Learn about our language support, audio formats, and transparent pay-per-character pricing without monthly fees or hidden costs.

Generate Spanish Transport Announcements with Loboki TTS

Frequently asked questions

What is the Loboki TTS API?

Loboki is a cloud text-to-speech API for indie developers. Send text via POST to receive an audio file. It uses the same request shape as the OpenAI speech endpoint, allowing you to use official OpenAI SDKs by changing the base_url to https://api.loboki.info/v1. It is designed for reliable, predictable latency in transport announcement systems.

Which voices support Spanish accents?

All eight voices support Spanish. You can choose from female voices like aria, nova, luna, or sage, or male voices like felix, milo, atlas, or orion. Each voice has a distinct character, and all can speak Spanish.

How does Spanish pronunciation compare to other languages?

Pronunciation is consistent across all 23 supported languages, including Spanish. The engine handles phonemes uniformly, ensuring clear articulation suitable for public transport announcements. Voices are based on licensed recordings. The output is intelligible for multilingual information systems.

Can I generate announcements in real-time?

No streaming or WebSocket support is available. Requests are processed sequentially, so under load, a request may wait in a queue. Typical speed is roughly real-time (25 characters per second), but short phrases take a few seconds. You must handle latency by pre-generating announcements or managing queue waits in your app.

What audio formats are available?

You can request audio in mp3, wav, opus, flac, or pcm formats. Specify your preferred format in the response_format field of the JSON body. These options allow you to balance file size and quality for your transport app’s network constraints and playback requirements.

How is the text input limited?

Each request accepts up to 4096 characters of text. Spaces and punctuation count toward this limit. If your announcement exceeds this length, you must split the text into parts, generate audio for each part, and join the resulting audio files in your application logic.

Do you support SSML for emphasis?

No, the API does not support SSML. You cannot add emphasis, pauses, or pronunciation dictionaries via markup. You must rely on the natural intonation of the chosen voice preset. For specific pacing, adjust the speed parameter between 0.25 and 4.0.

Is there a free trial for developers?

Yes, signing in with Google provides $0.50 of credit, valid for 7 days, allowing about 50,000 characters. Accounts created with email and password start without trial credit. This allows you to test integration and pronunciation quality before purchasing a top-up.

How do I handle long announcement texts?

Split your text into chunks of up to 4096 characters. Send each chunk as a separate POST request to the speech endpoint. Receive the individual audio files and join them in your application. This ensures you stay within character limits while delivering complete announcements.

What happens if a request fails?

If synthesis fails, the charge is returned in full. You are not billed for failed requests. This ensures you only pay for successfully generated audio files, protecting your budget during testing or when handling edge cases in your transport announcement system.

Is the speech synthetic or recorded?

The speech is synthetic but based on licensed recordings from LibriTTS-R (CC BY 4.0). Each generated file carries an inaudible watermark marking it as synthetic. It is not recorded human speech but generated from voice presets derived from public-domain audiobook readings.

Can I use this for commercial transport apps?

Yes, the API is suitable for commercial use. There are no restrictions on usage type. You pay based on characters processed, with no monthly plans or seats. Generated audio is returned in the response and not stored, making it ideal for on-demand transport announcements.

How is the Spanish accent defined?

The accent is defined by the voice preset you select. All eight voices speak Spanish naturally. If you do not set the language parameter, the system guesses the language from the script; for Spanish, it is recommended to explicitly set the language code to ensure accuracy.

Do I need to specify language codes?

It is recommended to set the language parameter explicitly, especially for non-English Latin-script text. If omitted, the system guesses the language, defaulting to English for Latin script. Setting the ISO code ensures correct pronunciation for Spanish and other supported languages in your transport system.

First request

curl

curl https://api.loboki.info/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

Clear Pronunciation for Multilingual Stations

Sound wave illustration for: Clear Pronunciation for Multilingual Stations

Multilingual stations require consistent pronunciation across diverse passenger demographics. Loboki’s engine handles Spanish with precision, ensuring that critical information is understood clearly regardless of the listener’s background. This reliability reduces cognitive load for travelers in busy transit hubs.

Accents and Dialects

Accents and Dialects

Our model supports Spanish without requiring separate voice profiles. The engine generalizes well across different regional pronunciations, maintaining clarity for both native speakers and non-native listeners.

Standard vs. Regional

We prioritize standard intelligibility over specific regional quirks. This approach ensures that announcements are clear to listeners using the same infrastructure.

Clarity in Noise

Transport environments are noisy. We optimize voice selection and audio formats to cut through ambient sound. Clear articulation ensures that safety instructions and route updates are heard even in crowded, echoey platforms.

Voice Selection for Announcements

Sound wave illustration for: Voice Selection for Announcements

Loboki provides eight distinct voice presets. Selecting the right voice ensures your announcements are understood quickly, even in noisy station halls or moving vehicles. Each voice offers a specific tonal character suitable for different types of public information.

Atlas delivers a neutral, authoritative tone ideal for standard news-style updates and route changes. Sage provides a calm, instructional voice perfect for safety guidelines and step-by-step directions. Felix offers an energetic, upbeat delivery suitable for promotional messages or station advertisements. All voices support Spanish and 22 other languages with consistent clarity.

Atlas for News

Atlas is designed for neutral, news-style delivery. Its balanced tone conveys authority without sounding stiff, making it ideal for real-time route updates, delay notifications, or general station information. The voice remains clear and consistent, ensuring passengers grasp critical details quickly.

  • Neutral, authoritative tone
  • Ideal for real-time updates
  • Clear articulation for noisy environments

Sage for Instructions

Sage offers a calm, instructional voice that excels in clarity. It is well-suited for safety instructions, boarding procedures, or detailed guidance where listeners need to process information step-by-step. The steady pace reduces cognitive load, helping passengers follow complex directions accurately.

  • Calm, steady delivery
  • Optimized for safety guidelines
  • Reduces listener cognitive load

Felix for Promos

Felix brings an energetic, upbeat quality to promotional content. Use it for station advertisements, special offers, or welcome messages to create a welcoming atmosphere. Its brighter tone stands out from standard announcements, drawing attention to commercial or community updates without disrupting the flow of critical information.

  • Energetic, upbeat delivery
  • Suitable for advertisements
  • Creates a welcoming atmosphere

Technical Integration

Sound wave illustration for: Technical Integration

Loboki’s TTS API mirrors the OpenAI speech endpoint structure, allowing developers to reuse existing client libraries with minimal configuration. By updating the base_url to https://api.loboki.info/v1 and providing your API key, you can integrate speech synthesis into transport information systems using standard HTTP clients or the official OpenAI SDK.

OpenAI SDK Compatible

Use the same request shape as OpenAI’s /v1/audio/speech endpoint. This compatibility means you can switch providers or scale infrastructure without rewriting your integration logic. Standard JSON bodies handle model selection, input text, voice presets, and audio format parameters seamlessly.

  • Compatible with OpenAI SDKs via base_url override
  • Standard JSON request body structure
  • Supports tts-1 and tts-1-hd models

Multiple Audio Formats

Select mp3, wav, opus, flac, or pcm based on your deployment needs. MP3 offers efficient bandwidth usage, while WAV ensures lossless clarity for local playback systems. Opus provides compression for low-bandwidth mobile apps.

  • MP3, WAV, Opus, FLAC, PCM support
  • Format selection via response_format parameter
  • Optimized for various network conditions

Simple Endpoint

Send a POST request to /v1/audio/speech with your text and voice selection. The API returns the audio file directly in the response. Authentication is handled via a Bearer token in the Authorization header, ensuring secure access to your generated announcements.

  • Single endpoint: POST /v1/audio/speech
  • Bearer token authentication
  • Direct audio file response

Language Support

Sound wave illustration for: Language Support

Loboki supports Spanish alongside 22 other languages, ensuring consistent clarity for multilingual transport systems. Any voice can speak any supported language, allowing you to maintain a uniform audio brand across different regions.

Spanish Coverage

Our API handles Spanish text with high accuracy, suitable for station announcements and route updates. We do not offer region-specific voice variants; instead, the engine delivers consistent, clear pronunciation across all Spanish-speaking areas.

  • Supports standard Spanish pronunciation
  • No regional voice variants
  • Consistent clarity across dialects

Multilingual Switching

You can switch languages between requests without changing the voice model. This allows a single endpoint to handle announcements in English, Spanish, French, or any other supported language seamlessly.

Auto-Detection Limits

If you do not specify the language parameter, the system guesses the language based on the script. Latin script defaults to English, so non-English Latin text requires explicit language setting. Note that Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali and other languages not in the list are not supported.

  • Default to English for Latin script
  • Explicit language code recommended
  • Unsupported: Vietnamese, Indonesian, Thai

Performance and Latency

Sound wave illustration for: Performance and Latency

Loboki’s synthesis engine processes text at roughly real-time speed, generating approximately 25 characters of audio per second for longer announcements. This predictable latency ensures that audio files are ready for playback scheduling without significant delay, making it suitable for timed station broadcasts where precise timing matters.

Real-Time Generation

For standard-length announcements, generation time closely mirrors the duration of the resulting audio. This linear relationship allows developers to pre-calculate buffer times accurately. The system processes requests sequentially, meaning throughput is consistent but not parallelized per request.

Queue Handling

Requests are processed one after another. Under heavy load, a request may wait in a queue before synthesis begins. This sequential processing ensures stable output but means high concurrency can increase total latency beyond the generation time alone.

  • Rate limit: 60 requests per minute per key.
  • Initial limit: 10 requests per minute before first top-up.

Short Phrase Speed

Short phrases (e.g., single stop announcements) take a few seconds to generate due to fixed overhead. This is significantly longer than the audio duration itself. Plan for this overhead when triggering immediate audio playback in real-time interfaces.

Performance and Latency

Audio Quality and Format

Sound wave illustration for: Audio Quality and Format

Loboki TTS returns audio in multiple formats to suit your infrastructure. Choose MP3 for efficient storage, WAV for lossless clarity, or Opus for bandwidth optimization. Each format balances file size and quality without compromising the synthetic watermark embedded in every file.

MP3 Efficiency

MP3 is the default for most transport applications. It offers a good balance between file size and sound quality. Use this format to minimize storage costs while maintaining clear speech for station announcements.

WAV Clarity

Choose WAV for lossless audio fidelity. This format is ideal for high-quality playback systems where bit-perfect reproduction is required. It ensures no compression artifacts affect the clarity of critical safety instructions.

Opus Optimization

Opus provides compression for low-bandwidth environments. It is suitable for mobile apps where data efficiency matters. The format supports variable bitrate to maintain quality under network constraints.

Use Cases in Transport

Sound wave illustration for: Use Cases in Transport

Loboki’s TTS API handles high-volume announcement workflows with predictable latency. By splitting texts into 4096-character chunks, the system ensures consistent audio generation for station PA systems without dropping syllables during peak hours.

The API returns standard formats like MP3 and WAV, allowing direct integration into existing broadcast software. This eliminates the need for complex transcoding pipelines when updating digital signage or audio loops across a transit network.

Station Announcements

Use voices like Atlas for neutral, clear arrival and departure updates. The engine handles mixed-language inputs.

Generate repetitive loop audio efficiently. With a $0.01 per 1,000 characters cost, broadcasting frequent schedule updates remains economical for indie operators managing small fleets.

  • Neutral voice for standard departures
  • Automatic language detection for mixed routes
  • Low cost for high-frequency loops

Route Updates

Push real-time delay messages via simple HTTP requests. The API processes requests sequentially, ensuring ordered delivery of critical route changes to passenger displays.

Support multilingual switching for tourist routes. Send text in Spanish, English, or any supported language in a single request, allowing dynamic content updates based on current passengers.

  • Real-time delay integration
  • Multilingual tourist routes
  • Sequential request processing

Safety Instructions

Deploy clear safety warnings using calm voices like Sage. The consistent tone ensures instructions are understood quickly in noisy environments.

Generate short, urgent phrases. Even under load, short announcements retain clarity, ensuring passengers hear door closing or emergency alerts without delay.

  • Calm instructional tone
  • Clear emergency warnings
  • Instant load for short phrases

Developer Experience

Sound wave illustration for: Developer Experience

Loboki’s API mirrors the OpenAI speech endpoint structure, allowing you to swap the base URL and start generating audio immediately using familiar SDKs or simple HTTP requests. The single endpoint handles model selection, voice presets, and output formats with minimal configuration overhead.

Quick Start Guide

Send a POST request to /v1/audio/speech with your Bearer token. Include the text, voice, and desired format. The API returns the audio file directly, requiring no polling or complex setup for basic integration.

  • Use tts-1 or tts-1-hd models
  • Supports MP3, WAV, Opus, FLAC, PCM
  • Simple JSON body structure

API Documentation

Full reference details are available in our docs. You can test voices and check supported languages via the /v1/voices endpoint before committing to integration. The documentation covers all parameters, including speed adjustments and language codes.

Error Handling

Standard HTTP status codes indicate success or failure. Failed synthesis requests are refunded instantly, ensuring you only pay for completed audio. Check the response body for specific error messages to debug request issues quickly.

Pricing for Developers

Sound wave illustration for: Pricing for Developers

Loboki charges $0.01 per 1,000 characters, including spaces and punctuation. Failed requests are free, ensuring you only pay for successful audio synthesis. A free trial provides $0.50 credit for 7 days, sufficient for approximately 50,000 characters.

Pay Per Character

Pricing is straightforward: $10 per 1 million characters. There are no hidden fees for model selection; both 'tts-1' and 'tts-1-hd' engines cost the same. This flat rate simplifies budgeting for high-volume transport announcement systems.

  • $0.01 per 1,000 characters
  • Spaces and punctuation count
  • Failed requests are free

No Monthly Fees

There are no monthly subscriptions, seats, or minimum spends. You can use the API sporadically or continuously without recurring costs. Balance does not expire, allowing you to top up only when needed.

  • No monthly plans
  • No seats required
  • No minimum spend

Transparent Costs

Top-ups are processed via USDT (TRC-20) with a $5 minimum. Credits are added automatically within minutes. We do not offer invoices with VAT, keeping the billing structure simple for indie developers and small teams.

  • USDT TRC-20 only
  • $5 minimum top-up
  • Automatic crediting

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Its distinct tone stands out in crowded acoustic environments, ensuring the message is heard clearly even with background noise.

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. IETF RFC 7845: Ogg Opus
  3. FFmpeg documentation
  4. LibriTTS-R corpus (OpenSLR 141)
  5. MDN: Web Speech API
  6. Creative Commons Attribution 4.0
  7. LibriVox public-domain audiobooks
  8. Python documentation
  9. OpenAI API reference: create speech
  10. Tether (USDT)
  11. openai-python on GitHub
  12. ISO 639 language codes

More on this site