You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

google-tts

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-tts

google-tts (Google Text-to-Speech), a Python library with Google text-to-speech API

1.0.1
pipPyPI
Maintainers
1

google-tts

google-tts (Google Text-to-Speech), a Python library with Google text-to-speech API. Write spoken audio data to a file, or get Base64 encoding audio data

PyPI version Python versions Commits Since

Features

  • Text length up to 5000 characters
  • Customizable speak-rate (0.25 - 4.0) and sample-rate
  • Audio encoding: LINEAR16, MP3, OGG-OPUS, MULAW, ALAW
  • MALE and FEMALE voice

Installation

$ pip install google-tts

Quickstart

from GoogleTTS import GoogleTTS
tts = GoogleTTS()
ret = tts.tts('Xin chào!', 'output.mp3')
if 'audioContent' in ret:
    b64 = ret['audioContent']
else:
    error = ret['error']
    code = error['code']
    message = error['message']
    status = error['status']

Licence

The MIT License (MIT) Copyright © 2022 ykuta

Keywords

google-tts

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts