Ruby client that interacts with the IBM Watson Speech to Text service through its WebSockets interface #Installation Install Ruby #How to Use You will need to fill in the vacant username and password entries in the example.rb file before you can run it. You will specifically need a username and password for the speech-to-text service. Please note that service credentials are different than Bluemix account credentials.
To get service credentials, follow these steps:
-
Log in to Bluemix at https://bluemix.net. If you don't have an account, sign up here for a 30-day free trial.
-
Create an instance of the service:
- In the Bluemix Catalog, scroll down to Services and select the Speech To Text service from Watson.
- Under Add Service, type a unique name for the service instance in the Service name field. For example, type
my-service-name. Leave the default values for the other options. - Click Create.
-
Copy your credentials:
- On the left side of the page, click Service Credentials to view your service credentials.
- Copy
usernameandpasswordfrom these service credentials and paste them into the example.rb file.
-
Run the example.rb file
#Dependencies For this client to work properly, some additional dependencies need to be installed. First, make sure to install the Ruby Package Managment Framework, called Ruby Gems, from [here] (https://rubygems.org/pages/download). Afterwards, you need to install the following dependencies:
- websocket-client-simple
- eventmachine
- activesupport
For help on how to install a dependency, called a 'gem' in ruby, follow [this link] (http://guides.rubygems.org/rubygems-basics/#installing-gems).