texttospeech

module
v0.0.0-...-cdd8ae1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2018 License: MIT

README

Google Cloud Text-to-Speech API Client Library for Go

GoDoc

Package texttospeech offers a Client to interact with Google Cloud Text-to-Speech API.

NOTE: this package actually offers the v1beta1 version of the API, so it could stop working in case of breaking changes made by Google engineers.

Documentation

Documentation is available on GoDoc.

Usage example

The samples folder contains a minimal application to help you understand how to use the package.

Authentication

The package requires valid authentication credentials to access Google Cloud Text-to-Speech API.

  • Create a project with the Google Cloud Console, and enable the Text-to-Speech API.

  • From the Cloud Console, create a service account, download its json credentials file, then set the GOOGLE_APPLICATION_CREDENTIALS environment variable:

    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
    

For more information about Authentication, please consult Google's Authentication Overview.

Run the sample

Before running the example you must first install the Text-to-Speech API client:

go get -u github.com/giefferre/texttospeech

To run the example:

go run synthesize.go en "Hello world" output.mp3

Reference

This library is inspired by:

Directories

Path Synopsis
Package texttospeech offers a Client to interact with Google Cloud Text-to-Speech API.
Package texttospeech offers a Client to interact with Google Cloud Text-to-Speech API.
Command synthesize sends input text the Google Text-to-Speech API and converts it to an MP3 audio file.
Command synthesize sends input text the Google Text-to-Speech API and converts it to an MP3 audio file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL