Brooooooklyn / Brooooooklyn/whisper-node
Ability to decode readable stream
- Dominant language
- Rust
- Stars
- 25
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Buffering an audio file can be expensive in terms of memory, it'd be nice if the lib could decode the readable stream as well.
```ts
const stream = fs.createReadStream(file)
const decoded = decodeAudioStream(stream)
```
Perhaps symphonia can be customized to decode a chunk at a time?
Here's a pseudocode for example:
```ts
// Transform stream (node)
_transform(chunk, _, done) {
this.push(binding.decodeAudioChunk(chunk))
done()
}
```
```rs
fn decode_audio_chunk(chunk: Vec) {
...
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the existing Symphonia decoding path and the Node binding entry point. Define how decodeAudioStream and decodeAudioChunk should handle chunk boundaries and completion without buffering the whole file. Done means a readable stream can be decoded incrementally with bounded memory and the resulting audio matches current decoding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, rust, typescript
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100