Table of contents
Important
This package is ESM only.
To install @lobehub/tts, run the following command:
$ bun add @lobehub/ttsNote
By work correct with Next.js SSR, addtranspilePackages: ['@lobehub/tts']tonext.config.js. For example:
const nextConfig = {
transpilePackages: ['@lobehub/tts'],
};If you want to deploy this service by yourself, you can follow the steps below.
Click button below to deploy your private plugins' gateway.
This project provides some additional configuration items set with environment variables:
| Environment Variable | Description | Example |
|---|---|---|
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.chatanywhere.cn/v1The default value is 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 | |
MICROSOFT_SPEECH_PROXY_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 | |
MICROSOFT_SPEECH_ALLOW_ORIGINS |
Allow origins , string or string array | |
EDDGE_API_TOKEN |
This is the API key of Edge Speech Service | 6A5AA1D4EAFF4E9FB37E23D68491D6F4 |
EDDGE_PROXY_URL |
If you manually configure the Edge interface proxy, you can use this configuration item to override the default Edge wss request base URL | wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1 |
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 devContributions 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.
- π€ 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.