Skip to content

Library for easily converting text to speech in multiple languages. No dependencies.

Notifications You must be signed in to change notification settings

gamboavalentinabel/easy-tts-mp3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

Easy TTS MP3 - 📄🔊

Library for easily converting text to speech in multiple languages. No dependencies.

Note

This library uses the Google Translate API with the base URL https://translate.google.com/translate_tts.
Example (Copy and paste into the browser) ↴

https://translate.google.com/translate_tts?ie=UTF-8&q=Esto%20es%20un%20test&tl=es-ES&total=1&idx=0&textlen=15&client=tw-ob&prev=input&ttsspeed=1

📥 Installation ↴

npm i easy-tts-mp3

NPM Package → 📦

🤔 How to use ↴

import easyTTSmp3 from 'easy-tts-mp3'

const stringFilePath = await easyTTSmp3(message, config?)
  • message: String with text to convert to speech

  • config?: Object with TTS configuration (optional).

⚙️ TTS configuration ↴

Name Description Default
Lang The language of the TTS - All Languages 'es-ES'
Path The relative path to save the file ' . '
Filename The file name 'tts.mp3'

✅ Check Lang ↴

import { checkLang } from 'easy-tts-mp3'

const check = checkLang(lang)
  • lang: The language of the TTS (Example: 'es-ES').

This function checks if the language exists in this library.

About

Library for easily converting text to speech in multiple languages. No dependencies.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published