Did you hear this awesome news? That AWS Lambda now supports Ruby! And we can’t leave you just with that information. We demand more knowledge! We’re excited to share the announcement that Amazon Transcribe Streaming Transcription Support in the AWS SDK for Ruby.
Amazon Transcribe streaming transcription enables you to send an audio stream, and with a single API call, receive a stream of text in real time.
The Amazon Transcribe
#start_stream_transcription API enables you to send an audio stream and receive a stream of text in real time. Although the AWS SDK for Ruby supports all Ruby versions later than 1.9.3, this API is streamed over the HTTP2 protocol. This means to use the API, you need to have Ruby version 2.1 or later.
If you want to check your Ruby version, run the following.
At the moment, Amazon Transcribe supports both 16 kHz and 8 kHz audio streams (WAV, MP3, MP4, and FLAC) in 16-bit linear PCM encoding. So we recommend to make sure your audio stream is under-supported sample rates before trying the API, or you might get back empty transcripts or bad request exceptions.
Although async API usage is new and different from sync API calls in the AWS SDK for Ruby, it’s streaming benefits for many use cases .You can find all of the available callback methods for
output_stream in the
Aws::TranscribeStreamingService::EventStreams::TranscriptResultStream documentation here.
And some Ruby information you shouldn’t miss. Numbered Parameters for Ruby 2.7. Explore the world around!