# edge-tts-nodejs
**Repository Path**: aedge/edge-tts-nodejs
## Basic Information
- **Project Name**: edge-tts-nodejs
- **Description**: Node version of edge-tts / Node版本的edge-tts
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2024-06-28
- **Last Updated**: 2025-03-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Nodejs, TTS
## README
Edge TTS NodeJs
English |
中文
关于项目 |
开始 |
案例 |
许可 |
依赖 |
作者
## 关于项目 ##
这是一个关于 [EdgeTTS](https://github.com/rany2/edge-tts) 的nodejs库,可以直接调用,适用于无成本AI配音
## 开始 ##
```bash
# 项目引入
$ npm i edge-tts-nodejs --save
```
## 案例 ##
```javascript
const { toVoice, voices } = require("edge-tts-nodejs")
const path = require("path")
// Export different formats
toVoice("你好世界", path.resolve('./wav/helloworld.mp3'))
toVoice("你好世界", path.resolve('./wav/helloworld.wav'))
// Use voice packages
toVoice("你好", path.resolve('./wav/voice.wav'), {
voice: "zh-CN-liaoning-XiaobeiNeural"
})
// Output helloWorld tts to example.wav and here is the complete item
toVoice("你好", path.resolve('./example.wav'), {
voice: "zh-CN-liaoning-XiaobeiNeural", // use voices() get voice package
rate: 30, // +30% speak rate
volume: 10, // +10% sound
pitch: 10 // +10Hz pitch
})
// All Voice List
voices()
// about language Voice list
// Option: af am ar az bg bn bs ca cs cy da de el en es et fa fi fil fr ga gl gu he hi hr hu id is it ja jv ka kk km kn ko lo lt lv mk ml mn mr ms mt my nb ne nl pl ps pt ro ru si sk sl so sq sr su sv sw ta te th tr uk ur uz vi zh
voices('zh') // 获取所有中文语音包
```
## 许可 ##
This project is under license from MIT. For more details, see the [LICENSE](LICENSE.md) file.
Made with :heart: by AEdge
## 依赖 ##
[edge-tts](https://github.com/rany2/edge-tts)
## 结束 ##
如果它对你有帮助,麻烦点一下 Star 感谢!
回到顶部