MuScriptor.Stream¶
| Name | Mandatory | Description | Default | Type |
|---|---|---|---|---|
⬅️ Input |
The input of the shard, if any | [Float] |
||
Output ➡️ |
The resulting output of the shard | [{pitch: Int onset: Float offset: Float program: Int drum: Bool instrument: String}] |
||
Model |
No | The MuScriptor model to use. | none |
Var(MuScriptorModel) |
SampleRate |
No | Sample rate of the input samples in Hz; each segment is resampled to 16000 if different. | 16000 |
Int |
Instruments |
No | Instrument names to condition the model on (e.g. "acoustic_piano" or ["acoustic_piano" "drums"]). | none |
NoneStringVar(String)[String]Var([String]) |
MaxTokens |
No | Maximum generated tokens per chunk. | 2000 |
Int |
Temperature |
No | Sampling temperature. 0 = greedy decoding (the reference default). | 0 |
Float |
TopP |
No | Top-p (nucleus) sampling; takes precedence over TopK. 0 disables. | 0 |
Float |
TopK |
No | Top-k sampling. 0 disables. | 0 |
Int |
Seed |
No | Random seed used when Temperature > 0. | 299792458 |
Int |
Drain |
No | When true, after consuming this activation's input, zero-pad and transcribe the remaining partial segment, close all open notes and reset the stream state. | false |
BoolVar(Bool) |
Reset |
No | When true, discard all buffered samples and decoder state before consuming this activation's input. | false |
BoolVar(Bool) |
Streaming audio-to-MIDI transcription. Feed mono samples incrementally (e.g. from a live audio wire); the shard buffers them, transcribes each full 5-second segment as it becomes available and keeps the decoder state across activations so notes sustained across segment boundaries survive. Outputs the notes completed during this activation (often empty while buffering). Set Drain: true on the final call to flush the remaining partial segment and reset for a new stream.