Skip to content

Add Intro message function for VoicePipeline #488

Open
@joowon-dm-snu

Description

@joowon-dm-snu

Please read this first

  • Have you read the docs?Agents SDK docs
  • Have you searched for related issues? Others may have had similar requests

Describe the feature

While working with the VoicePipeline, I encountered a limitation with the current design.
In the existing pipeline structure, the voice agent only initiates communication after audio input is received and transcribed, as evidenced by the design of the run function:

class VoicePipeline:
    async def _run_multi_turn(self, audio_input: StreamedAudioInput) -> StreamedAudioResult:
        ...
                    async for input_text in transcription_session.transcribe_turns():
                        result = self.workflow.run(input_text)

This implementation requires the workflow.run function to be called only after the transcription of the user's audio input has begun, preventing the voice agent from starting the conversation proactively.
This design is not ideal for scenarios where the agent should initiate a conversation or deliver an introductory message before any user input is provided.

To address this, I propose adding a dedicated function to the VoicePipeline class, such as:

async def initiate_intro_audio_stream(self, intro_message: str | None = None) -> StreamedAudioResult:

This function would allow developers to trigger an initial intro audio stream, enabling the voice agent to communicate with users immediately upon startup. This enhancement would make the VoicePipeline more flexible and user-friendly, particularly for applications that rely on the agent to deliver greetings or instructions proactively.

If this feature already exists or if there's an alternative approach, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions