Skip to main content

Import

import { Voice, Task } from "smithers-orchestrator";

Props

PropTypeDefaultDescription
providerVoiceProviderVoice provider instance. Required.
speakerstringundefinedDefault speaker/voice ID for TTS within this subtree.
childrenReactNodeNested tasks and control-flow nodes.

Basics

<Voice provider={voice} speaker="alloy">
  <Task id="transcribe" output={outputs.transcript} agent={myAgent}>
    Transcribe the audio and return the text.
  </Task>
</Voice>
Descendant tasks receive voice and voiceSpeaker on their descriptors. The engine uses these fields to invoke voice operations around agent execution.

Nesting

Innermost <Voice> in scope determines a task’s effective voice provider:
<Voice provider={openaiVoice} speaker="alloy">
  <Task id="a" output={outputs.out}>Uses openaiVoice with alloy</Task>
  <Voice provider={elevenLabsVoice} speaker="rachel">
    <Task id="b" output={outputs.out}>Uses elevenLabsVoice with rachel</Task>
  </Voice>
</Voice>

With Other Components

<Voice> composes with all existing control-flow components:
<Voice provider={voice}>
  <Parallel>
    <Task id="transcribe-en" output={outputs.en} agent={agent}>
      Transcribe the English audio.
    </Task>
    <Task id="transcribe-fr" output={outputs.fr} agent={agent}>
      Transcribe the French audio.
    </Task>
  </Parallel>
</Voice>

Internals

  • Renders to <smithers:voice>.
  • Extraction assigns voice and voiceSpeaker to every descendant task descriptor via a voiceStack pattern, matching how worktreeStack and parallelStack work.
  • The scheduler is unaware of voice; the engine consumes these fields at task execution time.