zlargon / Google Tts
Licence: mit
Google TTS (Text-To-Speech) for node.js
Stars: ✭ 180
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Google Tts
Zerospeech Tts Without T
A Pytorch implementation for the ZeroSpeech 2019 challenge.
Stars: ✭ 100 (-44.44%)
Mutual labels: text-to-speech, tts
Durian
Implementation of "Duration Informed Attention Network for Multimodal Synthesis" (https://arxiv.org/pdf/1909.01700.pdf) paper.
Stars: ✭ 111 (-38.33%)
Mutual labels: text-to-speech, tts
Spokestack Python
Spokestack is a library that allows a user to easily incorporate a voice interface into any Python application.
Stars: ✭ 103 (-42.78%)
Mutual labels: text-to-speech, tts
Gtts
Python library and CLI tool to interface with Google Translate's text-to-speech API
Stars: ✭ 1,303 (+623.89%)
Mutual labels: text-to-speech, tts
Marytts
MARY TTS -- an open-source, multilingual text-to-speech synthesis system written in pure java
Stars: ✭ 1,699 (+843.89%)
Mutual labels: text-to-speech, tts
Joytan
Creative Audio/Textbook Maker 🎵 📖 See our YouTube channel
Stars: ✭ 91 (-49.44%)
Mutual labels: text-to-speech, tts
Crystal
Crystal - C++ implementation of a unified framework for multilingual TTS synthesis engine with SSML specification as interface.
Stars: ✭ 108 (-40%)
Mutual labels: text-to-speech, tts
Lightspeech
LightSpeech: Lightweight and Fast Text to Speech with Neural Architecture Search
Stars: ✭ 31 (-82.78%)
Mutual labels: text-to-speech, tts
Aeneas
aeneas is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment)
Stars: ✭ 1,942 (+978.89%)
Mutual labels: text-to-speech, tts
Pytorch Dc Tts
Text to Speech with PyTorch (English and Mongolian)
Stars: ✭ 122 (-32.22%)
Mutual labels: text-to-speech, tts
Speaker
A PHP library to convert text to speech using various web services
Stars: ✭ 86 (-52.22%)
Mutual labels: text-to-speech, tts
Androidmarytts
Android MARY TTS - an open-source, offline HMM-Based text-to-speech synthesis system based on MaryTTS
Stars: ✭ 134 (-25.56%)
Mutual labels: text-to-speech, tts
Cs224n Gpu That Talks
Attention, I'm Trying to Speak: End-to-end speech synthesis (CS224n '18)
Stars: ✭ 52 (-71.11%)
Mutual labels: text-to-speech, tts
Amazon Polly Sample
Sample application for Amazon Polly. Allows to convert any blog into an audio podcast.
Stars: ✭ 139 (-22.78%)
Mutual labels: text-to-speech, tts
Zhrtvc
Chinese real time voice cloning (VC) and Chinese text to speech (TTS). 好用的中文语音克隆兼中文语音合成系统,包含语音编码器、语音合成器、声码器和可视化模块。
Stars: ✭ 771 (+328.33%)
Mutual labels: text-to-speech, tts
Jsut Lab
HTS-style full-context labels for JSUT v1.1
Stars: ✭ 28 (-84.44%)
Mutual labels: text-to-speech, tts
google-tts
Google TTS (Text-To-Speech) for node.js
Installation
$ npm install --save google-tts-api
$ npm install -D typescript @types/node # Only for TypeScript
Change Log
Please see CHANGELOG.
Usage
Method | Options (all optional) | Return Type | Handle Long Text |
---|---|---|---|
getAudioUrl |
lang , slow , host
|
string |
|
getAudioBase64 |
lang , slow , host , timeout
|
Promise<string> |
|
getAllAudioUrls |
lang , slow , host , splitPunct
|
{ shortText: string; url: string; }[] |
✅ |
getAllAudioBase64 |
lang , slow , host , timeout , splitPunct
|
Promise<{ shortText: string; base64: string; }[]> |
✅ |
Options (all optional)
Option | Type | Default | Description |
---|---|---|---|
lang |
string |
en | See all avaiable language code at https://cloud.google.com/speech/docs/languages |
slow |
boolean |
false | Use the slow audio speed if set slow to true
|
host |
string |
https://translate.google.com | You can change the host if the default host could not work in your region (e.g. https://translate.google.com.cn). |
timeout |
number |
10000 (ms) | (Only for getAudioBase64 and getAllAudioBase64 ) Set timeout for the HTTP request. |
splitPunct |
string |
(Only for getAllAudioUrls and getAllAudioBase64 ) Set the punctuation to split the long text to short text. (e.g. ",、。") |
Examples
getAudioUrl(text, [option])
1. import * as googleTTS from 'google-tts-api'; // ES6 or TypeScript
const googleTTS = require('google-tts-api'); // CommonJS
// get audio URL
const url = googleTTS.getAudioUrl('Hello World', {
lang: 'en',
slow: false,
host: 'https://translate.google.com',
});
console.log(url); // https://translate.google.com/translate_tts?...
getAudioBase64(text, [option])
2. import * as googleTTS from 'google-tts-api'; // ES6 or TypeScript
const googleTTS = require('google-tts-api'); // CommonJS
// get base64 text
googleTTS
.getAudioBase64('Hello World', {
lang: 'en',
slow: false,
host: 'https://translate.google.com',
timeout: 10000,
})
.then(console.log) // base64 text
.catch(console.error);
getAllAudioUrls(text, [option])
(For text longer than 200 characters)
3. import * as googleTTS from 'google-tts-api'; // ES6 or TypeScript
const googleTTS = require('google-tts-api'); // CommonJS
const results = googleTTS.getAllAudioUrls('LONG_TEXT_...', {
lang: 'en',
slow: false,
host: 'https://translate.google.com',
splitPunct: ',.?',
});
console.log(results);
// [
// { shortText: '...', url: '...' },
// { shortText: '...', url: '...' },
// ...
// ];
getAllAudioBase64(text, [option])
(For text longer than 200 characters)
4. import * as googleTTS from 'google-tts-api'; // ES6 or TypeScript
const googleTTS = require('google-tts-api'); // CommonJS
googleTTS
.getAllAudioBase64('LONG_TEXT_...', {
lang: 'en',
slow: false,
host: 'https://translate.google.com',
timeout: 10000,
splitPunct: ',.?',
})
.then(console.log)
// [
// { shortText: '...', base64: '...' },
// { shortText: '...', base64: '...' },
// ...
// ];
.catch(console.error);
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].