Zendesk Polly
Too shy to record your own voice for Zendesk Talk greetings? How about letting someone else read your text?
ZendeskPolly uses Amazon Polly text-to-speech engine to convert your text messages into audio files.
This gem is far from being production ready. As of now, it's just a spike to get to know a bit of Zendesk's API.
Installation
Install the gem and use the command line:
$ gem install zendesk_polly
Or add this line to your application's Gemfile:
gem 'zendesk_polly'
And then provide ZendeskPolly with the required credentials and account details:
$ zp init
This command will start an interactive shell session and will save your credentials at ~/.zendesk_polly
.
Usage
$ zp --help
NAME:
ZendeskPolly
DESCRIPTION:
Client to create zendesk greetings with Aws Polly
COMMANDS:
categories Lists available greeting categories
create Creates a Zendesk greeting with Aws Polly
help Display global or [command] help documentation
init Configures ZendeskPolly
voices Lists available voices
Usage
Most commands have interactive mode, but can be initialized with some options.
Use zp [command] --help
for details.
Examples
$ zp create --name 'My new greeting' --category 'ivr' --voice 'Joanna' --text 'This will be read by Joanna'
$ zp create
You can also use ZendeskPolly's client inside your own application.
client = ZendeskPolly::Client.new do |c|
c.aws_region = ...
c.zendesk_token = ...
c.zendesk_username = ...
c.zendesk_url = ...
c.aws_key = ...
c.aws_secret = ...
end
greeting = client.polly_greeting.new(name: 'greeting name', text: "I've just initialized a voice message")
greeting.play
greeting.save
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/angelim/zendesk_polly.