Skip to content

Do I need to implement the ".receive" method of my customized "StreamHandler" class, if I only use a "recieve-only" WebRTC component #398

@ANYMS-A

Description

@ANYMS-A

Hi,
currently I want to use a text-in, audio-out model to build my chatbot. So for the WebRTC widget, I think I only need to use the mode= "recieve" when init it.

audio_text = WebRTC(
    mode="receive",
    modality="audio",
)


audio_text .stream(
    fn=my_stream_handler
    inputs=[input_text_box],
    outputs=[audio_text ],
    time_limit=600,
    concurrency_limit=WEB_RTC_CONCURRENCY,
)

So for my customized stream handler implementation, how should I take care of the implement of the ".receive" method?
I think since I am using recieve only mode, it wont get any audio frame as input right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions