Package Exports
- @lobehub/tts
- @lobehub/tts/es/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lobehub/tts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lobe TTS
A high-quality & reliable TTS React Hooks library
Changelog Β· Report Bug Β· Request Feature

Table of contents
TOC
π¦ Installation
Important
This package is ESM only.
To install @lobehub/tts, run the following command:
$ bun add @lobehub/ttsCompile with Next.js
Note
By work correct with Next.js SSR, addtranspilePackages: ['@lobehub/tts']tonext.config.js. For example:
const nextConfig = {
transpilePackages: ['@lobehub/tts'],
};π³ Self Hosting
If you want to deploy this service by yourself, you can follow the steps below.
Deploy to Vercel
Click button below to deploy your private plugins' gateway.
Environment Variable
This project provides some additional configuration items set with environment variables:
| Environment Variable | Description | Default |
|---|---|---|
ALLOW_ORIGINS |
Allow origins , string or string array | |
OPENAI_API_KEY |
This is the API key you apply on the OpenAI account page | sk-xxxxxx...xxxxxx |
OPENAI_PROXY_URL |
If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | https://api.openai.com/v1 |
AZURE_SPEECH_KEY |
This is the API key of Azure Speech Service | |
AZURE_SPEECH_REGION |
This is the region of Azure Speech Service | |
AZURE_SPEECH_PROXY_URL |
If you manually configure the AZURE Speech interface proxy, you can use this configuration item to override the default Speech API request base URL | /api/azure-speech |
MICROSOFT_SPEECH_API_URL |
If you manually configure the Microsoft Speech interface proxy, you can use this configuration item to override the default Speech API request base URL | /api/microsoft-speech |
EDGE_API_TOKEN |
This is the API key of Edge Speech Service | |
EDGE_SPEECH_API_URL |
If you manually configure the Edge interface proxy, you can use this configuration item to override the default Edge wss request base URL |
β¨οΈ Local Development
You can use Github Codespaces for online development:
Or clone it for local development:
$ git clone https://github.com/lobehub/lobe-tts.git
$ cd lobe-tts
$ bun install
$ bun devπ€ Contributing
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what youβre made of.
π More Products
- π€ Lobe Chat - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
- π€― Lobe theme - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.