Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rxtoolkit/stt-aws
👂 RxJS operator for realtime speech-to-text (STT/S2T) using AWS Transcribe
https://github.com/rxtoolkit/stt-aws
ai fp functional-programming observables package reactive-programming rxjs speech-to-text stt transcription
Last synced: 7 days ago
JSON representation
👂 RxJS operator for realtime speech-to-text (STT/S2T) using AWS Transcribe
- Host: GitHub
- URL: https://github.com/rxtoolkit/stt-aws
- Owner: rxtoolkit
- License: mit
- Created: 2021-02-09T20:15:48.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T18:39:33.000Z (9 months ago)
- Last Synced: 2024-09-19T19:25:58.201Z (about 2 months ago)
- Topics: ai, fp, functional-programming, observables, package, reactive-programming, rxjs, speech-to-text, stt, transcription
- Language: JavaScript
- Homepage:
- Size: 3.64 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @rxtk/stt-aws
> 👂 An RxJS operator for real-time speech-to-text (STT/S2T) streaming using the AWS Transcribe.```bash
npm i @rxtk/stt-aws
``````bash
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:
```js
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](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Audio_concepts)