Skip to content

kmulvey/text2speech

Repository files navigation

text2speech

Build Release Go Report Card Go Reference

Convert text to speech using AWS Polly.

Dependencies

This depends on oto which has some prerequisites.

Linux

ALSA is required. On Ubuntu or Debian, run this command:

apt install libasound2-dev

On RedHat-based linux distributions, run:

dnf install alsa-lib-devel

Examples

Pipe text:

echo "The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom." | ./text2speech -bucket your-s3-bucket

File Input

./text2speech -bucket your-s3-bucket -input text

MP3 output:

./text2speech -bucket your-s3-bucket -input text -output audio.mp3 # this will only write the file, it will not play it

Displaying a dashboard to monitor progress

./text2speech -bucket your-s3-bucket -input text -dashboard

Print help:

./text2speech -h