Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Storytelling example: Why toggle setLocalAudio() every turn? #180

Open
TomTom101 opened this issue May 25, 2024 · 3 comments
Open

Comments

@TomTom101
Copy link
Contributor

TomTom101 commented May 25, 2024

First up, brilliant project! Still trying to wrap my head around the concept, but making some baby steps.

My question is: Why do we have to toggle recording when at the same time the "interruptible" feature is demoed in other examples?

if (e.data?.cue === "user_turn") {
  // Delay enabling local mic input to avoid feedback from LLM
  setTimeout(() => daily.setLocalAudio(true), 500);
  setStoryState("user");
} else {
  daily.setLocalAudio(false);
  setStoryState("assistant");
}

Is the "always listening" feature a unique one of the Daily default video call screen which does not apply to custom apps? Would it record the audio of the TTS output (which is a typical problem of any speech-to-speech systems I have written myself)?

Thanks for clarification, looking forward to v0.0.24 :)

@aconchillo
Copy link
Contributor

I think this was just an example to show how you would use cues, but Storytelling could be adjusted to use interruptions.

@chadbailey59
Copy link
Contributor

This example is a bit different than the others, because it's very explicitly "turn-based." The way the app is designed is to ask you for story input at very specific times, and then generate several pages of "story" without being interrupted. We built an earlier version that left the mic unmuted all the time and just tried to ignore transcriptions when the user wasn't supposed to be talking, but that gets really complex; it turns out it's way easier just to mute the mic. :)

This example could definitely work with interruptions, but it would probably take some re-working of the prompts to tell the bot what to do when the user interrupts.

@TomTom101
Copy link
Contributor Author

but it would probably take some re-working of the prompts to tell the bot what to do when the user interrupts.
Can you hint me towards an example which shows what needs to be done in the prompt to support it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants