The project is in a healthy, maintained state
Install `runapi-openai-tts`, create `RunApi::OpenaiTts::Client`, and call `client.text_to_speech.run(model: "tts-1", text: "Hello")`.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.3.0
 Project Readme

RunAPI

OpenAI TTS API SDKs for JavaScript, Python, Ruby, Go, Java, and PHP on RunAPI.

npm PyPI RubyGems Go Reference Maven Central License

Generate MP3 speech from text with tts-1 or tts-1-hd. RunAPI validates and stores each audio result before returning it.

Install

npm install @runapi.ai/openai-tts
pip install runapi-openai-tts
gem install runapi-openai-tts
go get github.com/runapi-ai/openai-tts-sdk/go@latest

For Java, install ai.runapi:runapi-openai-tts:0.1.1. The PHP package is released from the split repository at https://github.com/runapi-ai/openai-tts-php.

Quick start

import { OpenaiTtsClient } from '@runapi.ai/openai-tts';

const client = new OpenaiTtsClient();
const result = await client.textToSpeech.run({ model: 'tts-1', text: 'Hello from RunAPI' });
console.log(result.audios[0].url);

Variants

The returned URL points to RunAPI-managed storage. See the OpenAI TTS model page for current pricing, limits, and usage details.

License

Licensed under the Apache License, Version 2.0.