jsgoecke/att_speech — pull request #1 by PWx21 (2013-05-09 15:47:45+00:00)
Title: TTS

## Changes:

### gemfile
Kept Celluloid below 0.14.0 because it breaks rspec tests

### README and example.rb
I saw that the README was the same as the example.rb file. I wasn't exactly sure how to deal with them. I modified the example.rb file so that it can be run via "bundle exec ruby examples/example.rb" from the root folder. I modified the README so that it describes the new functionality as how it could be used in a project where the gem is installed.

### rakefile and .gemspec
I would like my name added to the list of authors. But if not, I won't be distraught, as you did the heavy lifting. I expanded the description, and the link in the summary wasn't broken, but I replaced it anyway with the API's URL as it currently is.

### att_speech.rb
The initialize/new method requires an additional "scope" parameter which gets passed on to the Faraday connection, depending if you want text->speech ("TTS") or speech->text ("SPEECH")

Changed self in initialize method to Actor.current in regards to the first gotcha listed [here](https://github.com/celluloid/celluloid/wiki/Gotchas)

I did want to make the base_url https://api.att.com/speech/v3 and have both resources be shorter (speechToText or textToSpeech), so that it lines up with the resource specified [here](https://developer.att.com/developer/basicTemplate.jsp?passedItemId=13100102&api=Speech&version=3), but I couldn't figure out how to do it without the rspec tests failing.

The example.rb file had 2-space indentation, while the this file had 4-space indentation, and there were tabs interspersed. I removed all tabs, and switched the indentation to 2-spaces. I think it looks much cleaner.

The one method I did add outright is the text_to_speech, which takes in either a string, or .txt file and returns a string of bytes that can be turned into a .wav file.

### att_speech_spec.rb
Added 2 tests to cover the scope param requirements, and added a scope to the initializers. I wasn't sure how to write tests for requesting fake text->speech requests, so I left those out.