Use the recognize_using_websocket
method in the Speech to Text Service of the Ruby SDK
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
username
andpassword
from these service credentials and paste them into the example.rb file.
-
Run the example.rb file