@360labs/live-transcribe 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.md +170 -0
- package/dist/index.d.mts +2689 -0
- package/dist/index.d.ts +2689 -0
- package/dist/index.js +4777 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4682 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +86 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-01-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Initial release
|
|
14
|
+
- Web Speech API provider
|
|
15
|
+
- Deepgram provider
|
|
16
|
+
- AssemblyAI provider
|
|
17
|
+
- Session management
|
|
18
|
+
- Audio processing utilities
|
|
19
|
+
- Voice Activity Detection
|
|
20
|
+
- Multiple export formats (JSON, Text, SRT, VTT, CSV)
|
|
21
|
+
- TypeScript support
|
|
22
|
+
- Comprehensive documentation
|
|
23
|
+
- React and Vue examples
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- N/A
|
|
27
|
+
|
|
28
|
+
### Deprecated
|
|
29
|
+
- N/A
|
|
30
|
+
|
|
31
|
+
### Removed
|
|
32
|
+
- N/A
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- N/A
|
|
36
|
+
|
|
37
|
+
### Security
|
|
38
|
+
- N/A
|
|
39
|
+
|
|
40
|
+
[Unreleased]: https://github.com/yourusername/live-transcribe/compare/v0.1.0...HEAD
|
|
41
|
+
[0.1.0]: https://github.com/yourusername/live-transcribe/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Live Transcribe
|
|
2
|
+
|
|
3
|
+
> Professional live speech transcription library for TypeScript/JavaScript with multi-provider support
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@360labs/live-transcribe)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[]()
|
|
9
|
+
|
|
10
|
+
**Built by 360labs**
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **Multiple Provider Support** - Web Speech API, Deepgram, AssemblyAI
|
|
15
|
+
- **Real-time Transcription** - Live results with interim and final transcripts
|
|
16
|
+
- **40+ Languages** - Support for languages worldwide
|
|
17
|
+
- **Audio Recording** - Built-in recording capabilities
|
|
18
|
+
- **Session Management** - Easy session control and state management
|
|
19
|
+
- **Voice Activity Detection** - Automatic speech detection
|
|
20
|
+
- **Export Formats** - JSON, Text, SRT, VTT, CSV
|
|
21
|
+
- **Fully Typed** - Complete TypeScript support with comprehensive types
|
|
22
|
+
- **Event-driven** - Subscribe to transcription events easily
|
|
23
|
+
- **Browser & Node.js** - Works in both environments
|
|
24
|
+
- **Extensible** - Easy to add custom providers
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @360labs/live-transcribe
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { createTranscriber, TranscriptionProvider } from '@360labs/live-transcribe';
|
|
36
|
+
|
|
37
|
+
// Create a transcriber with Web Speech API (browser-native, no API key required)
|
|
38
|
+
const transcriber = createTranscriber({
|
|
39
|
+
provider: TranscriptionProvider.WebSpeechAPI,
|
|
40
|
+
language: 'en-US',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Listen for transcription events
|
|
44
|
+
transcriber.on('transcript', (result) => {
|
|
45
|
+
console.log(result.text);
|
|
46
|
+
console.log('Is final:', result.isFinal);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
transcriber.on('error', (error) => {
|
|
50
|
+
console.error('Transcription error:', error);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Start transcribing
|
|
54
|
+
await transcriber.start();
|
|
55
|
+
|
|
56
|
+
// Stop when done
|
|
57
|
+
await transcriber.stop();
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Session Management
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { createSession, TranscriptionProvider } from '@360labs/live-transcribe';
|
|
64
|
+
|
|
65
|
+
// Create a session for full control
|
|
66
|
+
const session = createSession({
|
|
67
|
+
provider: TranscriptionProvider.WebSpeechAPI,
|
|
68
|
+
language: 'en-US',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Start, pause, resume, stop
|
|
72
|
+
await session.start();
|
|
73
|
+
session.pause();
|
|
74
|
+
session.resume();
|
|
75
|
+
await session.stop();
|
|
76
|
+
|
|
77
|
+
// Get transcripts and export
|
|
78
|
+
const transcripts = session.getTranscripts();
|
|
79
|
+
const exported = session.export('srt'); // json, text, srt, vtt, csv
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Provider Configuration
|
|
83
|
+
|
|
84
|
+
### Web Speech API (Browser)
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
const transcriber = createTranscriber({
|
|
88
|
+
provider: TranscriptionProvider.WebSpeechAPI,
|
|
89
|
+
language: 'en-US',
|
|
90
|
+
interimResults: true,
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Deepgram
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
const transcriber = createTranscriber({
|
|
98
|
+
provider: TranscriptionProvider.Deepgram,
|
|
99
|
+
apiKey: 'your-deepgram-api-key',
|
|
100
|
+
language: 'en-US',
|
|
101
|
+
model: 'nova-2',
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### AssemblyAI
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
const transcriber = createTranscriber({
|
|
109
|
+
provider: TranscriptionProvider.AssemblyAI,
|
|
110
|
+
apiKey: 'your-assemblyai-api-key',
|
|
111
|
+
sampleRate: 16000,
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Supported Languages
|
|
116
|
+
|
|
117
|
+
The library supports 40+ languages including:
|
|
118
|
+
|
|
119
|
+
- **English** (US, UK, Australia, India, Canada)
|
|
120
|
+
- **Spanish** (Spain, Mexico, Argentina)
|
|
121
|
+
- **French** (France, Canada)
|
|
122
|
+
- **German** (Germany, Austria)
|
|
123
|
+
- **Portuguese** (Brazil, Portugal)
|
|
124
|
+
- **Chinese** (Simplified, Traditional)
|
|
125
|
+
- **Japanese, Korean, Hindi**
|
|
126
|
+
- **Arabic, Hebrew, Persian**
|
|
127
|
+
- **Russian, Ukrainian, Polish**
|
|
128
|
+
- And many more...
|
|
129
|
+
|
|
130
|
+
## Events
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
transcriber.on('transcript', (result) => { /* Real-time transcripts */ });
|
|
134
|
+
transcriber.on('final', (result) => { /* Final transcripts only */ });
|
|
135
|
+
transcriber.on('interim', (result) => { /* Interim transcripts only */ });
|
|
136
|
+
transcriber.on('start', () => { /* Transcription started */ });
|
|
137
|
+
transcriber.on('stop', () => { /* Transcription stopped */ });
|
|
138
|
+
transcriber.on('pause', () => { /* Transcription paused */ });
|
|
139
|
+
transcriber.on('resume', () => { /* Transcription resumed */ });
|
|
140
|
+
transcriber.on('error', (error) => { /* Handle errors */ });
|
|
141
|
+
transcriber.on('stateChange', (state) => { /* State changed */ });
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Examples
|
|
145
|
+
|
|
146
|
+
Check out the [examples](./examples) directory for more usage examples:
|
|
147
|
+
|
|
148
|
+
- Basic transcription
|
|
149
|
+
- React integration
|
|
150
|
+
- Vue integration
|
|
151
|
+
- Multiple providers
|
|
152
|
+
- Session management
|
|
153
|
+
- Export formats
|
|
154
|
+
- Custom providers
|
|
155
|
+
|
|
156
|
+
## API Documentation
|
|
157
|
+
|
|
158
|
+
See the [API Documentation](./docs/api.md) for detailed information on all available methods and options.
|
|
159
|
+
|
|
160
|
+
## Contributing
|
|
161
|
+
|
|
162
|
+
Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
**Made with care by 360labs**
|