simulstream.server.speech_processors.incremental_output
Functions
|
Merge the incremental outputs passed as input into a single incremental output. |
Classes
|
Represents the incremental output of a speech processor for a single processed chunk of audio. |
- class simulstream.server.speech_processors.incremental_output.IncrementalOutput(new_tokens: List[str], new_string: str, deleted_tokens: List[str], deleted_string: str)
Represents the incremental output of a speech processor for a single processed chunk of audio.
- simulstream.server.speech_processors.incremental_output.merge_incremental_outputs(outputs: List[IncrementalOutput], tokens_to_string: Callable[[List[str]], str]) IncrementalOutput
Merge the incremental outputs passed as input into a single incremental output. The outputs must be sorted in cronological order.
- Parameters:
outputs (List[IncrementalOutput]) – List of incremental outputs to be merged.
tokens_to_string (Callable[[List[str]], str]) – A function that takes a list of tokens and returns a string that contains the detokenized text.