You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP β†’
Socket
Book a DemoInstallSign in
Socket

@rxtk/stt-aws

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rxtk/stt-aws

πŸ‘‚ RxJS operator for realtime speech-to-text (STT/S2T) using AWS Transcribe

0.0.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
Β 
Created
Source

@rxtk/stt-aws

πŸ‘‚ An RxJS operator for real-time speech-to-text (STT/S2T) streaming using the AWS Transcribe.

npm i @rxtk/stt-aws
yarn add @rxtk/stt-aws

⚠️ To run the AWS Transcribe pipeline, you'll need a valid ACCESS_KEY_ID and SECRET_ACCESS_KEY with permissions to run AWS Transcribe. You'll need to set these in the environment or else it will probably not work. Unfortunately, this module does not auto-detect AWS credentials stored in ~/.aws.

⚠️ node.js only. This has not been tested on Browsers but it might be possible to make it work. If you get it working, please make a PR!

API

toAWSTranscribe

Stream audio speech data to AWS Transcribe via WebSocket and get transcripts back:

import {map} from 'rxjs/operators';
import {toAWSTranscribe} from '@rxtk/stt-aws';

// The pipeline can take a stream of audio chunks encoded as 
// LINEAR16 (PCM encoded as 16-bit integers) in the form of a Buffer
const stt$ = pcmChunkEncodedAs16BitIntegers$.pipe(
  map(chunk => Buffer.from(chunk, 'base64')),
  toAWSTranscribe()
);
stt$.subscribe(console.log); // log transcript output
stt$.error$.subscribe(console.error) // handle WebSocket errors

⚠️ Pay attention to the endcoding of the audio data. The operator only accepts PCM data encoded as 16-bit integers. For example, LINEAR16 encoding usually works.

Guides

  • Introduction to audio data

Keywords

speech-to-text

FAQs

Package last updated on 01 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts