8000 GitHub - jhoelzl/Python-Bing-TTS: Microsoft Bing Text to Speech library for Python
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jhoelzl/Python-Bing-TTS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Bing-TTS

Microsoft Bing Text to Speech library for Python

Installation

To install using pip, run the following command:

pip install git+https://github.com/westparkcom/Python-Bing-TTS.git

Usage

The following is the usage of the library

translator.speak(text, language, gender, fileformat)
Variable Description Note
text The text that you wish to convert to speech
language The language/country you wish to hear the speech in Case sensitive. See Bing TTS API Refernce for list
gender Male or Female Case sensitive
fileformat File format to encode the speech to See Bing TTS API Reference for list of formats

Example

from bingtts import Translator
translator = Translator('YOUR-API-KEY-HERE')
output = translator.speak("This is a text to speech translation", "en-US", "Female", "riff-16khz-16bit-mono-pcm")
with open("file.wav", "w") as f:
    f.write(output)

About

Microsoft Bing Text to Speech library for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0