How to Convert Audio to Text in Ruby

Having trouble keeping track of all the information that is laid out in a meeting? Creating an audio recording and transcribing the text afterwards is a foolproof way to ensure no vital pieces of discussion are missed. However, to avoid the drawn-out process of manual transcription, we will be showing you how you can use an API in Ruby to convert an input audio file into text.

First, add the Ruby client to your Gemfile:

gem install cloudmersive-voice-recognition-api-client

Now, you can input the audio file and API key into the following code to call the function:

# load the gem
require 'cloudmersive-voice-recognition-api-client'
# setup authorization
CloudmersiveVoiceRecognitionApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'

The operation uses speech recognition technology to perform the transcription and promptly deliver the requested text. If you need to obtain an API key, you can do so by registering for a free account on the Cloudmersive website; this provides 800 calls/month across any of our APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.