Speech Pipeline

This module contains the speech pipeline which manages the components for processing speech.

class spokestack.pipeline.SpeechPipeline(input_source, stages)[source]

Pipeline for managing speech components.

Parameters
  • input_source (Any) – source of audio input

  • stages (List[Any]) – components desired in the pipeline

  • **kwargs – additional keyword arguments

activate()[source]

Activates the pipeline

Return type

None

close()[source]

Closes the running pipeline

Return type

None

property context

Current context

Return type

SpeechContext

deactivate()[source]

Deactivates the pipeline

Return type

None

event(function=None, name=None)[source]

Registers an event handler

Parameters
  • function (Optional[Any]) – event handler

  • name (Optional[str]) – name of event handler

Return type

Any

Returns

Default event handler if a function not specified

property is_running

State of the pipeline

Return type

bool

pause()[source]

Stops audio input until resume is called

Return type

None

resume()[source]

Resumes audio input after a pause

Return type

None

run()[source]

Runs the pipeline to process speech and cleans up after stop is called

Return type

None

start()[source]

Starts input source of the pipeline

Return type

None

step()[source]

Process a single frame with the pipeline

Return type

None

stop()[source]

Halts the pipeline

Return type

None