Skip to content

HTTPolly is an basic HTTP proxy for calling Amazon Polly via a super-simple JSON endpoint and returns the MP3 directly.

License

Notifications You must be signed in to change notification settings

tsileo/httpolly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

HTTPolly

HTTPolly is an basic HTTP proxy for calling Amazon Polly via a super-simple JSON endpoint and returns the MP3 directly.

Installation

$ go install github.com/tsileo/httpolly
$ export AWS_SECRET_ACCESS_KEY=XXX
$ export AWS_ACCESS_KEY_ID=XXX
$ export AWS_REGION=XXX
$ $GOPATH/bin/httpolly

Client example

import requests
from subprocess import Popen, PIPE

resp = requests.post('http://localhost:8015', json={'text': 'Salut tu vas bien ?', 'voice_id': 'Celine'})
resp.raise_for_status()
p = Popen(['madplay', '-'], stdin=PIPE, stderr=PIPE)
p.communicate(input=resp.content)
p.wait()

About

HTTPolly is an basic HTTP proxy for calling Amazon Polly via a super-simple JSON endpoint and returns the MP3 directly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published