Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rxtoolkit/stt-ibm
👂 An RxJS operator for real-time speech-to-text (STT/S2T) streaming using the IBM Watson.
https://github.com/rxtoolkit/stt-ibm
ai fp functional-programming observables package reactive-programming rxjs speech-to-text stt transcription
Last synced: 7 days ago
JSON representation
👂 An RxJS operator for real-time speech-to-text (STT/S2T) streaming using the IBM Watson.
- Host: GitHub
- URL: https://github.com/rxtoolkit/stt-ibm
- Owner: rxtoolkit
- License: mit
- Created: 2021-04-30T16:56:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T17:48:09.000Z (6 months ago)
- Last Synced: 2024-10-14T09:18:16.809Z (about 1 month ago)
- Topics: ai, fp, functional-programming, observables, package, reactive-programming, rxjs, speech-to-text, stt, transcription
- Language: JavaScript
- Homepage:
- Size: 3.76 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @rxtk/stt-ibm
> 👂 An RxJS operator for real-time speech-to-text (STT/S2T) streaming using the IBM Watson.```bash
npm i @rxtk/stt-ibm
``````bash
yarn add @rxtk/stt-ibm
```You'll need an IBM Watson account with credentials for the STT API.
## Demo
To run the demo pipeline:
```bash
yarn demo:run --secret --write-output
```## API
### `toIBM`
```js
import {from} from 'rxjs';
import {myFunction} from '@rxtk/stt-ibm';
import {fromFile} from '@rxtk/fs';const filePath = 'path/to/audio-file.linear16';
// For a full list of options, see ./src/lib/toIBM.js
const params = {
secretAccessKey: process.env.IBM_SECRET_ACCESS_KEY,
instanceId: process.env.IBM_STT_INSTANCE_ID,
region: 'us-east',
};
const audioChunk$ = fromFile(filePath);
const output$ = audioChunk$.pipe(toIBM(params));
output$.subscribe(console.log);
// Output:
// {...resultFromIBMWatson}
// {...anotherResultFromIBMWatson}
output$.error$.subscribe(console.error); // optional: handle Websocket Errors
```## References
- [IBM Speech-to-text docs](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-websockets)