Text to Speech API for IoT and Smart Home Automations

By IoT Voice Labs editorial team · Updated 2026-11-18

Welcome to IoT Voice Labs, the text-to-speech API built for smart home enthusiasts and IoT developers. If you want to add voice to your projects without heavy coding, this page shows you exactly how to do it. We use the standard OpenAI SDK, so you can send text and receive audio files for your devices. While synthesis takes a few seconds for short phrases or roughly real-time for longer texts, the result is a ready-to-use audio file. No complex pipelines or extra infrastructure required—just clear, natural speech for your automations.

On this page, you will find everything needed to get started with our TTS API. Learn about our 8 voice presets, 23 supported languages, and straightforward pricing. Whether you are building a voice assistant, an alert system, or an interactive kiosk, we offer lightweight audio files and easy integration. Explore the technical details, see concrete code examples, and discover how to add voice to your smart home projects today.

Text to Speech API for IoT and Smart Home Automations

Frequently asked questions

What is npm text to speech?

npm text to speech is a cloud API that converts text into audio files via a simple POST request. You send JSON with your text and voice choice, and receive an audio file back. It works seamlessly with the OpenAI SDK for Node.js, allowing IoT developers to add voice to smart home projects without heavy coding.

How does npm text to speech work?

Send a POST request to the API endpoint with your text, chosen voice, and format. The service processes the request and returns the audio file. For texts over 4096 characters, split them into parts and join the resulting audio files. Failed requests do not consume your credit.

Is npm text to speech free?

You get a free trial with $0.50 credit (about 50,000 characters) valid for 7 days when signing in with Google. Otherwise, it costs $10 per 1 million characters. Failed requests are free, and there are no monthly plans or minimum spend requirements.

Can I use npm text to speech with Node.js?

Yes. Our API matches the OpenAI request shape, so you can use the official OpenAI SDKs by setting base_url to https://api.tk971.info/v1. Send text and receive audio files easily. This simple integration works great for IoT developers using JavaScript or TypeScript, letting you add voice to your smart home projects without heavy coding.

What languages does npm text to speech support?

We support 23 languages, including English, Spanish, German, French, Chinese, Japanese, and Arabic. Any voice can speak any of these languages. If the language isn’t specified, it guesses from the script (defaulting to English for Latin text). Unsupported languages include Vietnamese, Thai, Indonesian, Ukrainian, Romanian, Czech, and Bengali.

How much does npm text to speech cost?

Pricing is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count as characters. You can top up using USDT on the TRON network. There are no monthly plans, seats, or minimum spend requirements, and failed requests are free.

Does npm text to speech support streaming?

No, it does not support streaming, WebSocket connections, or real-time partial audio. You send a request and receive the complete audio file in the response. For long texts, you split them into parts, generate each file, and join them in your application.

Can I clone my own voice with npm text to speech?

No, custom voice cloning is not offered. You cannot upload your own voice or design new voices. The service uses 8 preset voices based on licensed recordings from LibriTTS-R and LibriVox. Each generated file carries an inaudible watermark marking it as synthetic speech.

What audio formats does npm text to speech support?

You can choose from mp3, wav, opus, flac, and pcm formats. Specify your preferred format in the request body. The API returns the audio file directly in the response, ready for use in your IoT device or smart home application.

Is npm text to speech suitable for commercial projects?

Yes. Input text isn’t used for training, and generated audio isn’t stored. While there are no enterprise contracts, SLAs, or uptime guarantees, the API is built for production. It offers clear pricing at $0.01 per 1,000 characters, reliable character-based billing, and a 60 requests/minute rate limit suitable for commercial smart home projects.

How do I integrate npm text to speech into my smart home?

Sign up at /get-api-key/ to get your API key. Use the OpenAI SDK in Node.js, changing the base_url to https://api.tk971.info/v1. Send text via POST requests to generate audio files. Split long texts into 4096-character chunks and join the audio outputs.

What are the rate limits for npm text to speech?

Your API key allows 60 requests per minute. Before your first top-up, this limit is 10 requests per minute. Since requests are processed sequentially, heavy usage may cause your request to wait in a queue. For longer texts, generation takes roughly real-time speed, so longer inputs naturally require more time to complete.

Does npm text to speech work offline?

No, IoT Voice Labs is a cloud API. You must send text to the endpoint to receive an audio file, so an internet connection is required. There is no on-premise install option, and it does not work offline within your local network or device.

How long are my audio files stored?

Generated audio is returned in the response and not stored by the service. Request metadata, such as time, characters, and status, is kept for billing purposes. Input text is used only for synthesis and is not retained for training or other purposes.

First request

curl

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

Why IoT Developers Choose Our TTS API

Sound wave illustration for: Why IoT Developers Choose Our TTS API

Our API mirrors the OpenAI speech endpoint structure, allowing Node.js developers to redirect the standard SDK to our base URL. You only need to configure the API key and target the audio endpoint; existing chat or embedding code remains unaffected.

This approach eliminates the need for custom HTTP clients or heavy parsing logic. You send text, receive an audio file, and integrate it directly into your smart home automations with minimal code overhead.

Simple npm Integration

The request shape matches the official OpenAI speech endpoint exactly. By changing the base_url in your OpenAI SDK client to https://api.tk971.info/v1, you can use the same npm package to generate speech. This means no custom client code is needed; just configure your API key and target the audio endpoint.

  • Use standard openai npm package
  • Change base_url to our API
  • No custom HTTP parsing required

No-Code Friendly

Smart home enthusiasts can use simple HTTP requests or visual automation tools like Node-RED. Send a POST request with your text and voice preference, and receive an MP3 or WAV file ready for playback. No complex server setup or library dependencies required.

  • Works with Node-RED
  • Simple JSON payload
  • Ready-to-play audio files

Lightweight Audio Files

Generated audio files are optimized for low-bandwidth IoT devices. Choose formats like MP3 or Opus to minimize storage and transmission costs. Each request processes text up to 4096 characters, returning a single audio file that plays immediately on your smart speaker or display.

  • MP3, WAV, Opus, FLAC, PCM
  • Optimized for low bandwidth
  • Immediate playback support

Voices for Your Smart Devices

Sound wave illustration for: Voices for Your Smart Devices

Our TTS API provides eight distinct voice presets, each based on licensed recordings from LibriTTS-R and LibriVox. These voices are ready for immediate integration into your smart home projects, ensuring clear audio output for your IoT devices without requiring custom voice design or cloning.

Selecting the right tone helps your device feel more intuitive. Whether you need a calm instructional guide or a bright upbeat assistant, each voice has a specific character that fits different interaction styles in your automation workflows.

Clear Narrator Voices

Aria delivers a warm, clear narration style. Luna offers a soft, storytelling tone. Sage provides a calm, instructional presence. These voices are ideal for reading longer text content or guiding users through complex sequences.

These presets are based on public-domain audiobook recordings, ensuring high quality without licensing complexity. Each generated file includes an inaudible watermark to mark it as synthetic speech.

  • Aria: warm, clear narrator
  • Luna: soft, storytelling
  • Sage: calm, instructional

Friendly Assistant Voices

Nova brings a bright, upbeat energy to short phrases. Milo offers a friendly, conversational tone. These voices work well for daily interactions and reminders in smart home environments.

They are optimized for clear pronunciation in English and 22 other supported languages. You can adjust the speed between 0.25 and 4.0 to match your device's playback requirements.

  • Nova: bright, upbeat
  • Milo: friendly, conversational

Deep Documentary Voices

Orion provides a deep, documentary-style tone. Felix adds energetic, promo-style delivery. Atlas offers a neutral, news-ready voice for straightforward information.

These voices cover a wide range of audio styles. All voices support 23 languages, including Arabic, Chinese, German, Japanese, and Spanish, allowing you to localize your IoT devices for global users.

  • Orion: deep, documentary
  • Felix: energetic, promo
  • Atlas: neutral, news
Voices for Your Smart Devices

Languages Supported in IoT Apps

Sound wave illustration for: Languages Supported in IoT Apps

Add natural voice to your IoT projects with support for 23 languages, including English, Spanish, German, and Japanese. Each voice can speak any of these languages, allowing you to localize your smart home devices for global audiences without managing separate voice assets.

Our API guesses the language from the script if you don't specify it, defaulting to English for Latin text. For other languages, simply set the language parameter to ensure accurate pronunciation and intonation.

23 Languages Available

We support Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Any voice preset can deliver clear speech in any of these languages.

  • Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish

Automatic Language Detection

If you omit the language field, the system guesses the language from the script. Note that non-English Latin-script text defaults to English, so set language explicitly for accurate results in other languages.

Multi-Language Support

You can mix languages in your app by sending separate requests for each language. Each request is independent, so there is no stateful connection or session to manage. This allows flexible, on-demand voice generation for diverse content.

How It Works for Smart Home Projects

Sound wave illustration for: How It Works for Smart Home Projects

Transform simple text commands into playable audio files with a straightforward API workflow. This process is designed for IoT devices that need to speak without complex media servers or heavy infrastructure.

Send Text via API

Use a standard HTTP POST request to send your text payload to the API endpoint. You can pass up to 4,000 characters per request, which covers most daily announcements or short instructions for your smart home hub.

Receive Audio Files

The API returns a complete audio file in your chosen format (mp3, wav, opus, flac, or pcm). Short phrases typically take a few seconds to generate, while longer texts may take longer due to sequential processing. You do not get a live stream; you receive a finished file ready for storage or playback.

Play on Your Devices

Save the received file locally on your hub or send it directly to compatible smart speakers. Since the API returns a standard audio file, no special streaming protocols are required from the server side; your device simply plays the file like any other media asset.

Pricing for IoT Scale

Sound wave illustration for: Pricing for IoT Scale

Our pricing model is built for IoT scale, charging just $10 per million characters, or $0.01 per 1,000 characters. Each API request supports up to 4,096 characters, making even the longest device prompts extremely affordable.

Pay Per Character

You only pay for what you use. Failed requests are free, with charges returned in full. Your balance does not expire, and you can track usage directly in your dashboard.

  • $10 per 1 million characters
  • $0.01 per 1,000 characters
  • Failed requests are free

No Monthly Fees

There are no monthly plans, seats, or minimum spends. Start with a $0.50 free trial (valid for 7 days) when you sign in with Google, or top up as needed.

  • No monthly subscriptions
  • No minimum spend
  • No seats required

USDT Payments

Top up using USDT on the TRON network (TRC-20). Minimum deposit is $5, and credits appear automatically within minutes. We do not accept cards, PayPal, or issue VAT invoices.

  • USDT (TRC-20) only
  • Minimum $5 top-up
  • Instant automatic credit
Pricing for IoT Scale

Technical Details for Developers

Sound wave illustration for: Technical Details for Developers

Integrate our TTS API into your Node.js smart home scripts with ease. The request body accepts model, input, voice, response_format, speed, and language, ensuring seamless integration. This structure matches the OpenAI speech endpoint, so existing libraries work with a simple base_url change.

OpenAI SDK Compatible

Use the official OpenAI SDKs by pointing base_url to https://api.tk971.info/v1. Pass your API key as a Bearer token. This allows you to leverage familiar npm packages for your IoT projects without writing custom HTTP clients.

  • Drop-in replacement for OpenAI TTS endpoints
  • Use standard tts-1 or tts-1-hd models

Multiple Audio Formats

Choose mp3, wav, opus, flac, or pcm via the response_format field. MP3 is ideal for bandwidth-constrained IoT devices, while WAV offers uncompressed quality for local playback. Select the format that best fits your device’s media player capabilities.

  • Optimized for low-bandwidth connections
  • Support for various hardware decoders

Rate Limits Explained

Each API key allows 60 requests per minute. New accounts start with a limit of 10 requests per minute. Requests are processed sequentially, so longer texts may queue. Split texts exceeding 4,096 characters into smaller parts to ensure smooth generation and avoid timeouts.

  • 60 req/min after top-up
  • 10 req/min for new keys

Use Cases for Smart Homes

Sound wave illustration for: Use Cases for Smart Homes

Integrate voice into your smart home ecosystem without complex infrastructure. Our API returns ready-to-play audio files, allowing even no-code users to trigger responses from IoT devices instantly.

Voice Assistants

Deploy responsive voice interfaces for smart displays or hubs. Send user commands to the API and receive natural-sounding replies to enhance interaction without building custom speech synthesis engines from scratch.

  • Respond to voice commands with clear audio
  • Enhance smart mirror or display interactions
  • Support multiple languages for diverse households

Alert Systems

Turn text notifications into audible warnings for security cameras or environmental sensors. Use the API to convert sensor data or alert messages into spoken announcements that devices can play immediately.

  • Convert sensor data into spoken warnings
  • Trigger audio alerts for security events
  • Customize tones for different alert types

Interactive Kiosks

Create engaging information points for homes or small businesses. Input text prompts and receive audio files to guide users through interactive experiences, all managed via simple API calls.

  • Guide users through interactive experiences
  • Provide clear instructions via audio
  • Easy integration with existing display hardware

Getting Started with npm

Sound wave illustration for: Getting Started with npm

Add our TTS client to your Node.js project with a single command. The library simplifies the API calls, allowing you to focus on your smart home logic rather than HTTP requests.

Install the Package

Run npm install @iot-voice-labs/tts-client in your project directory. This adds the necessary dependencies to your node_modules folder, ready for immediate use in your smart home scripts.

Configure Your Key

Retrieve your API key from the /get-api-key/ dashboard. Set it as an environment variable or pass it directly to the client constructor. Ensure the key is active to avoid rate limit errors.

Make Your First Request

Call the audio.speech endpoint with your desired text and voice preset. For example, request the tts-1 model with nova to generate a bright audio file for your device's speaker. The API returns a binary audio stream you can save or play immediately.

Getting Started with npm

Why Choose IoT Voice Labs

Sound wave illustration for: Why Choose IoT Voice Labs

We provide a straightforward API for IoT developers who want reliable voice integration without complex infrastructure. Our service is designed to be simple, allowing you to add voice to your projects with minimal coding effort.

Transparent Pricing

Costs are clear: $0.01 per 1,000 characters. You only pay for successful synthesis, and failed requests are free. Balances do not expire, so you can use your credits whenever your devices need them.

No Hidden Fees

There are no monthly plans, seats, or minimum spends. We do not charge for API calls beyond the character usage. You can issue a new API key anytime, and the old one stops immediately, giving you full control over your account security without extra costs.

Community Driven

We build the tools IoT enthusiasts need. While support is handled via email, our focus remains on delivering a practical, no-nonsense API that works with Node.js and standard HTTP requests. We prioritize features that matter for smart home automations over enterprise bloat.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Your devices work together to create a simple, comfortable home without any complex setup or coding knowledge required by you.

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. Node.js documentation
  4. LibriTTS-R corpus (OpenSLR 141)
  5. openai-node on GitHub
  6. Python documentation
  7. Tether (USDT)
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. TRON developer hub: TRC-20
  10. W3C WAI: making audio and video accessible
  11. FFmpeg documentation
  12. OpenAI API reference: create speech

More on this site