English | 中文
About | Technologies | Starting | Example | License | Dependence | Author
This is EdgeTTS library with NodeJs
# Install
$ npm i edge-tts-nodejs --save
const { toVoice, voices } = require("edge-tts-nodejs")
const path = require("path")
// Export different formats
toVoice("helloworld", path.resolve('./wav/helloworld.mp3'))
toVoice("helloworld", path.resolve('./wav/helloworld.wav'))
// Use voice packages
toVoice("Hello", path.resolve('./wav/voice.wav'), {
voice: "en-US-AndrewNeural"
})
// Output helloWorld tts to example.wav and here is the complete item
toVoice("helloWorld", path.resolve('./example.wav'), {
voice: "en-US-AndrewNeural", // 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('en')
This project is under license from MIT. For more details, see the LICENSE file.
Made with :heart: by AEdge
If it helps you, star the project, thanks!