Skip to content

Welcome message for nova sonic model

0

How can I make nova sonic model start the conversation with some welcome message, instead of waiting for user to speak? I tried adding USER textInput immediately after the SYSTEM prompt - but it seems to make no difference - the model seems to always wait for MEANINGFUL user utterance, and only after that starts speaking.

2 Answers
0

You can use the sample code posted here to have Nova Sonic speak first: https://github.com/aws-samples/amazon-nova-samples/tree/main/speech-to-speech/repeatable-patterns/nova-sonic-speaks-first . This basically involves sending a pre-recorded audio as part of contentStart(type=AUDIO) event in the beginning of the conversation.

answered 7 months ago
-1

To make Amazon Nova Sonic initiate the conversation with a welcome message without waiting for the user to speak first, you need to modify the event flow in your application. Here's how to achieve this:

  1. After the "Start Conversation" button is clicked, send a system prompt that instructs the model to begin with a welcome message. For example: "You are a friendly assistant. Begin the conversation by welcoming the user with a brief greeting. Then, ask how you can help them today."

  2. After sending your system prompt, immediately send a sequence of events that simulates an empty user turn:

  • Send a contentStart event for user input
  • Immediately send a contentEnd event for user input

This approach tricks the model into thinking the user has taken their turn, prompting it to respond with a welcome message.

Alternatively, you could send a silent or pre-recorded audio clip to Nova Sonic to initiate the conversation, which serves as a technical workaround to trigger the model's response.

The key is to follow the proper event sequence:

  • Send sessionStart event
  • Send promptStart event
  • Send system prompt (with instructions to welcome the user)
  • Simulate an empty user turn

By following this sequence, Nova Sonic will initiate the conversation with a welcome message as soon as the conversation starts, without requiring the user to speak first.
Sources
Instead of user trigger first, i need the nova sonic model trigger first and say welcome address to user, after the start conversation is clicked. | AWS re:Post
Speech-to-speech Example - Amazon Nova
System prompt authoring guidelines and examples - Amazon Nova

answered 10 months ago
  • Sorry - this makes no sense and doesn't work.

    • contentStart(type=AUDIO) event is already sent in the beginning of the conversation - so you can't send another one; and if you try to send contentEnd() for it - this closes the conversation.
    • contentStart(type=TEXT) can't be sent after contentStart(type=AUDIO) either - both according to the documentation and according to the actual model behavior.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.