vania-janet/multiturn-rag-retrieval-data huggingface dataset:
For more information, see [Languages and voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices) and [Using the default voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices-usespecify-voice-default).

customization_id (optional string)
: Specifies the globally unique identifier (GUID) for a custom model that is to be used for the synthesis. A specified custom model must match the language of the voice that is used for the synthesis. If you include a customization ID, you must make the request with credentials for the instance of the service that owns the custom model. Omit the parameter to use the specified voice with no customization. For more information, see [Understanding customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro).

rate_percentage (optional integer)
: Specifies the global speaking rate for the entire synthesis request. The speaking rate is the speed at which the service speaks the text that it synthesizes into speech. A higher rate causes the text to be spoken more quickly; a lower rate causes the text to be spoken more slowly. The parameter changes the per-voice default rate for an entire request. For more information, see [Modifying the speaking rate](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-rate-percentage).

pitch_percentage (optional integer)
: Specifies the global speaking pitch for the entire synthesis request. The speaking pitch represents the tone of the speech that the service synthesizes. It represents how high or low the tone of the voice is perceived by the listener. A higher pitch results in speech that is spoken at a higher tone; a lower pitch results in speech that is spoken in a lower tone. The parameter changes the per-voice default pitch for an entire request.
ok: got package text-to-speech-v1, displaying field parameters
[
{
"key": "__bx_creds",
"value": {
"text_to_speech": {
"credentials": "Credentials-1",
"instance": "Watson Text to Speech",
"password": "AAAA0AAAAAAA",
"url": "https://gateway.watsonplatform.net/text_to_speech/api",
"username": "00a0aa00-0a0a-12aa-1234-a1a2a3a456a7"
}
}
}
]







 Installing from the Cloud Functions console 

Install the Personality Insights package from the console.



1. In the Cloud Functions console, go to the [Create page](https://cloud.ibm.com/functions/create).
2. Select the namespace that you want to install the package into.
3. Click Install Packages.
4. Click the Watson Package group.
5. Click the Text To Speech Package.
6. Click Install.
7. After the package has been installed you will be redirected to the actions page and can search for your new package, which is named text-to-speech-v1.
8. To use the actions in the text-to-speech-v1 package, you must bind service credentials to the actions.



* To bind service credentials to all actions in the package, follow steps [4 and 6 in the CLI instructions](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-pkg_text_to_speechtexttospeech_cli).
* To bind service credentials to individual actions, complete the following steps in the console.



You must complete the following steps for each action that you want to use.



1. Click an action from the text-to-speech-v1 package that you want to use. The details page for that action opens.
Creating a custom prompt 

The Tune by Example feature is beta functionality that is supported only for US English custom models and voices.

Follow these steps to create a custom prompt for use in speech synthesis with the IBM Watson® Text to Speech service:



1. [Create a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-createtbe-create-custom-model). You can create a new custom model for your prompt, or you can add your prompt to an existing custom model.
2. [Create a speaker model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-createtbe-create-speaker-model). A speaker model lets the service train itself on the voice of the user who speaks a prompt. Speaker models are optional but highly recommended.
3. [Add a custom prompt](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-createtbe-create-add-prompt). You add a custom prompt to a custom model. A custom model can contain multiple prompts.
4. [Evaluate the custom prompt](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-createtbe-create-evaluate-prompt). Once you add a custom prompt to a custom model, it is important to verify the quality of the prompt by using it in a synthesis request. For information about using a prompt with a speech synthesis request, see [Using a custom prompt for speech synthesis](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-use).



You can add custom models, custom prompts, and speaker models as often as you need. You can add a maximum of 1000 custom prompts to a single custom model.



 Create a custom model 

You add a custom prompt to a custom model.
For more information, see [SSML elements](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-elements) and [The say-as element](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-elementssay-as_element).







 Rules for prompt audio 

For the spoken audio of a prompt:



* The audio must be in WAV format and must have a minimum sampling rate of 16 kHz. The service accepts audio with higher sampling rates, which it transcodes to 16 kHz before processing it.
* The length of the prompt audio is limited to 30 seconds.
* Ensure that the audio speaks the text of the prompt with prosody that reflects how you would like the prompt to be spoken by one of the service's voices. Here are some examples of ways to change prosody with a prompt:



* If you speak a question, make it sound like a question. For example, intonation tends to rise at the end of a question.
* If you speak a command, make it sound like a command. Emphasize the words of the phrase that indicate the command.
* Affect the speaking rate by accelerating or decelerating the voice at the word and syllable levels.
* Control the pitch by making words and syllables sound higher or lower. Pitch control is much more effective for prompts that have speaker models.
* Insert pauses to emphases certain aspects of the phrase. Leading and trailing pauses are removed.



* You cannot change the pronunciation of a word. The service pronounces words according to its default vocabulary and any custom words that are defined for the model of the custom prompt. For more information, see [Tune by Example and word pronunciation](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-introtbe-intro-how-pronunciation).
* You cannot control the expressiveness (for example, happiness or sadness) of a phrase. These qualities are different from intonation and cannot be adequately captured by the feature.
* You cannot control the loudness of a phrase.
Product guide 

 Text to Speech 

--------------------



* Get started



* [Getting started with Text to Speech](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-gettingStarted)
* [About Text to Speech](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-about)
* [Service features](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-service-features)
* [Data security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-data-security)
* [Installing and managing Text to Speech for IBM Cloud Pak for Data](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-speech-install-data)
* Release notes



* [Release notes for IBM Cloud](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes)
* [Release notes for IBM Cloud Pak for Data](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes-data)



* [Demo](https://www.ibm.com/demos/live/tts-demo/self-service/home)
* Additional resources



* [Pricing](https://www.ibm.com/cloud/watson-text-to-speech/pricing)
* [Blogs](https://developer.ibm.com/blogs/)
* [Webinars](https://www.ibm.com/watson/webinars/)





* How to



* Using languages and voices



* [Languages and voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices)
For more information, see [Using speaking styles](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-expressivesyntheses-expressive-styles).

New interjection emphasis with expressive neural voices
: With expressive neural voices, the service automatically detects a set of common interjections based on context. When it synthesizes these interjections, it gives them the natural emphasis that a human would use in normal conversation. For some of the interjections, you can use SSML to enable or disable their emphasis. For more information, see [Emphasizing interjections](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-expressiveemphasizing-interjections).

New word emphais with expressive neural voices
: The expressive voices use a conversational style that naturally applies the correct intonation from context. But you can indicate that one or more words are to be given more or less emphasis. The change in stress can be indicated by an increase or decrease in pitch, timing, volume, or other acoustic attributes. For more information, see [Emphasizing words](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-expressiveemphasizing-words).

The service now enforces stricter SSML validation
: The service now enforces stricter validation of input text that includes Speech Synthesis Markup Language (SSML) elements. Required elements of attributes must be specified with valid values. Otherwise, the request fails with a 400 error code. For more information about SSML validation and the requirements that marked-up text must meet, see [SSML validation](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-ssmlssml-errors).

Defect fix: The gender listed for the en-US_MichaelExpressive voice is now correct
: Defect fix: When you list information about the available voices, the gender of the en-US_MichaelExpressive voice is now male.
[More icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon on the node with slots, and then select Move.

![Shows the dialog tree. The user is clicking the Move action on the node with slots.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/slots-move-node.png)
7. Select the reservation node as the move-to location target, and then choose As child node from the menu.
8. Click to edit the reservation node. In the And finally section, change the action from Wait for user input to Skip user input.

![Shows the dialog reorganized to include a root node with the #reservation condition and a skip to action set up to go directly to its child node, which is the node with slots](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/slots-skip-user-input.png)

When a user input matches the reservation intent, this node is triggered. The slot context variables are all set to null, and then the dialog jumps directly to the node with slots to process it.







 Step 7: Give users a way to exit the process 

Adding a node with slots is powerful because it keeps users on track with providing the information you need to give them a meaningful response or perform an action on their behalf. However, there might be times when a user is in the middle of providing reservation details, but decides to not go through with placing the reservation. You must give users a way to exit the process gracefully.
[More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon on the node with slots, and then select Move.

![Shows the dialog tree. The user is clicking the Move action on the node with slots.](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/slots-move-node.png)
7. Select the reservation node as the move-to location target, and then choose As child node from the menu.
8. Click to edit the reservation node. In the And finally section, change the action from Wait for user input to Skip user input.

![Shows the dialog reorganized to include a root node with the #reservation condition and a skip to action set up to go directly to its child node, which is the node with slots](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/slots-skip-user-input.png)

When a user input matches the reservation intent, this node is triggered. The slot context variables are all set to null, and then the dialog jumps directly to the node with slots to process it.







 Step 7: Give users a way to exit the process 

Adding a node with slots is powerful because it keeps users on track with providing the information you need to give them a meaningful response or perform an action on their behalf. However, there might be times when a user is in the middle of providing reservation details, but decides to not go through with placing the reservation. You must give users a way to exit the process gracefully.
The slot context variables are all set to null, and then the dialog jumps directly to the node with slots to process it.







 Step 7: Give users a way to exit the process 

Adding a node with slots is powerful because it keeps users on track with providing the information you need to give them a meaningful response or perform an action on their behalf. However, there might be times when a user is in the middle of providing reservation details, but decides to not go through with placing the reservation. You must give users a way to exit the process gracefully. You can do so by adding a slot handler that can detect a user's desire to exit the process, and exit the node without saving any values that were collected.



1. You must teach the dialog to be able to recognize an #exit intent in the user input first.
2. Click the Intents tab to return to the Intents page. Add the #exit intent with the following example utterances.

I want to stop
Exit!
Cancel this process
I changed my mind. I don't want to make a reservation.
Stop the reservation
Wait, cancel this.
Nevermind.

![Shows the exit intent](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/slots-exit-intent.png)
3. Return to the dialog by clicking the Dialog tab. Click to open the node with slots, and then click Manage handlers.

![Shows the Manage handlers link on the node with slots](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/slots-manage-handlers.png)
4. Add the following values to the fields.



Node-level handler details

 Condition Response Action 

 `#exit` Ok, we'll stop there. No reservation will be made.
The slot context variables are all set to null, and then the dialog jumps directly to the node with slots to process it.







 Step 7: Give users a way to exit the process 

Adding a node with slots is powerful because it keeps users on track with providing the information you need to give them a meaningful response or perform an action on their behalf. However, there might be times when a user is in the middle of providing reservation details, but decides to not go through with placing the reservation. You must give users a way to exit the process gracefully. You can do so by adding a slot handler that can detect a user's desire to exit the process, and exit the node without saving any values that were collected.



1. You must teach the dialog to be able to recognize an #exit intent in the user input first.
2. Click the Intents tab to return to the Intents page. Add the #exit intent with the following example utterances.

I want to stop
Exit!
Cancel this process
I changed my mind. I don't want to make a reservation.
Stop the reservation
Wait, cancel this.
Nevermind.

![Shows the exit intent](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/slots-exit-intent.png)
3. Return to the dialog by clicking the Dialog tab. Click to open the node with slots, and then click Manage handlers.

![Shows the Manage handlers link on the node with slots](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/slots-manage-handlers.png)
4. Add the following values to the fields.



Node-level handler details

 Condition Response Action 

 `#exit` Ok, we'll stop there. No reservation will be made.
node.delete deletes a dialog node 
 node.update edits a dialog node 
 notifier.create creates a notifier 
 notifier.delete deletes a notifier 
 notifier.update updates a notifier 
 processor.create creates a processor 
 processor.delete deletes a processor 
 processor.update updates a processor 
 recommendationfile.create uploads a CSV file of utterances to a skill from which Watson can derive intent recommendations 
 recommendationfile.delete deletes a CSV file of utterances that is used to derive intent recommendations from a skill. 
 recommendationsources.update updates a CSV file or assistant log that is being used as the source for intent recommendations 
 release.create create a version from content in the draft environment 
 release.delete delete a version 
 release.deploy publish a version to an environment 
 skill.create creates a skill 
 skill.delete deletes a skill 
 skill.update updates a skill 
 skill_reference.create adds a specific skill to an assistant 
 skill_reference.delete removes a specific skill from an assistant 
 skill_reference.update updates a specific skill that is associated with an assistant 
 skill_variable.create create a skill variable 
 skill_variable.delete delete a skill variable 
 skill_variable.update update a skill variable 
 skills.export export a skill 
 skills.import import a skill 
 snapshot.create creates a version of a dialog skill 
 snapshot.delete deletes a version of a dialog skill 
 snapshot.update updates a version of a dialog skill 
 step.create adds a step to an action 
 step.delete deletes a step from an action 
 step.update updates a step in an action 
 step_handler.create create a step handler 
 step_handler.delete delete a step handler 
 step_handler.update update a step handler 
 synonym.create creates a synonym for an entity value 
 synonym.delete deletes a synonym that is associated with an entity value 
 synonym.update edits a synonym that is associated with an entity value 
 userdata.delete deletes data that was created by a specified customer
This documentation is for the classic Watson Assistant experience. To see the documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Improving a dialog node with slots 

In this tutorial, you will enhance a simple node with slots that collects the information necessary to make a restaurant reservation.



 Learning objectives 

By the time you finish the tutorial, you will understand how to:



* Test a node with slots
* Add slot response conditions that address common user interactions
* Anticipate and address unrelated user input
* Handle unexpected user responses





 Duration 

This tutorial will take approximately 2 to 3 hours to complete.





 Prerequisite 

Before you begin, complete the [Adding a node with slots to a dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-tutorial-slots). You must complete the first slots tutorial before you begin this one because you will build on the node with slots that you create in the first tutorial.







 Step 1: Improve the format of the responses 

When the date and time system entity values are saved, they are converted into a standardized format. This standardized format is useful for performing calculations on the values, but you might not want to expose this reformatting to users. In this step, you will reformat the date (2017-12-29) and time (17:00:00) values that are referenced by the dialog.



1. To reformat the $date context variable value, click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon for the @sys-date slot.
2. From the More!
: A change that was introduced in the previous release which changed all alphabetic characters to lowercase at the time an entity value was added has been fixed. The case of any alphabetic characters that are part of a pattern entity value are no longer changed when the value is added.

Dialog text response syntax fix
: Fixed a bug in which the format of a dialog response reverted to an earlier version of the JSON syntax. Standard text responses were being saved as output.text instead of output.generic. For more information about the output object, see [Anatomy of a dialog call](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-context).





 13 September 2019 

Improved Entities and Intents page responsiveness
: The Entities and Intents pages were updated to use a new JavaScript library that increases the page responsiveness. As a result, the look of some graphical user interface elements, such as buttons, changed slightly, but the function did not.

Creating contextual entities got easier
: The process you use to annotate entity mentions from intent user examples was improved. You can now put the intent page into annotation mode to more easily select and label mentions. See [Adding contextual entities](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-create-annotation-based).





 6 September 2019 

Label character limit increase
: The limit to the number of characters allowed for a label that you define for an option response type changed from 64 characters to 2,048 characters.





 12 August 2019 

New dialog method
: The getMatch method was added. You can use this method to extract a specific occurrence of a regular expression pattern that recurs in user input. For more details, see the [dialog methods](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methodsdialog-methods-strings-getMatch) topic.





 9 August 2019 

Introductory product tour
: For some first-time users, a new introductory product tour is shown that the user can choose to follow to perform the initial steps of creating an assistant.





 6 August 2019
Step 2: Temporarily digressing away from dialog 

Digressions allow for the user to break away from a dialog branch in order to temporarily change the topic before returning to the original dialog flow. In this step, you will start to book a restaurant reservation, then digress away to ask for the restaurant's hours. After providing the opening hours information, your assistant will return back to the restaurant booking dialog flow.



1. Click Dialog to switch from the page with intents to a view of the dialog tree.
2. Click the ![Try it](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/ask_watson.png) icon to open the Try it out pane.
3. Type Book me a restaurant into the text field.

Your assistant responds with a prompt for the day to reserve, When do you want to go?
4. Click the Location![Location](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/location.png) icon next to the response to highlight the node that triggered the response, the Restaurant booking node, in the dialog tree.

![Shows the Restaurant booking node highlighted and the dialog in progress in the Try it out pane.](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/tut-dig-location.png)
5. Type Tomorrow.

Your assistant responds with a prompt for the time to reserve, What time do you want to go?
6. You do not know when the restaurant closes, so you ask, What time do you close?