vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* You passed a custom language model with the custom_language_model_id query parameter that is not in the available state. A custom language model must be fully trained and available to be used to train a custom acoustic model.
* You passed an incompatible custom language model with the custom_language_model_id query parameter. Both custom models must be based on the same version of the same base model.



The service returns a status code of 400 and sets the custom model's status to failed. Take one of the following actions:



* Use the GET /v1/acoustic_customizations/{customization_id}/audio and GET /v1/acoustic_customizations/{customization_id}/audio/{audio_name} methods to examine the model's audio resources. For more information, see [Listing audio resources for a custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudiolistAudio).

For each invalid audio resource, do one of the following:



* Correct the audio resource and use the allow_overwrite parameter of the POST /v1/acoustic_customizations/{customization_id}/audio/{audio_name} method to add the corrected audio to the model. For more information, see [Add audio to the custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acousticaddAudio).
* Use the DELETE /v1/acoustic_customizations/{customization_id}/audio/{audio_name} method to delete the audio resource from the model. For more information, see [Deleting an audio resource from a custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudiodeleteAudio).



* Set the strict parameter of the POST /v1/acoustic_customizations/{customization_id}/train method to false to exclude invalid audio resources from the training. The model must contain at least one valid audio resource for training to succeed.
* KEY_ID_OR_ALIAS

The v4 UUID or alias of the root key that you used for the initial wrap request.
* -i, --instance-ID

The IBM Cloud instance ID that identifies your Key Protect instance.

You can set an environment variable instead of specifying -i with the following command: $ export KP_INSTANCE_ID=<INSTANCE_ID>.







 Optional parameters 



* --key-ring

A unique, human readable name for the key-ring. Required if the user doesn't have permissions on the default key ring.
* -n --number-of-key-versions

Restricts the number of key versions to be retrieved by the supplied integer value (default: 200).
* -o, --output

Set the CLI output format. By default, all commands print in table format. To change the output format to JSON, use --output json.
* -s --starting-offset

Retrievies the key versions from the offset as specified by the supplied integer value.
* -t --total-count

Used to reterieve total number of key versions for a key by the supplied integer value.
* -a --all-key-states

An optional flag to return the number of versions for all key states, including keys that are not active.









 kp key wrap 

[Wrap a data encryption key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) (DEK) using a root key that is stored in the Key Protect instance. A DEK is typically used to encrypt "other" pieces of information.

When you wrap a DEK with a root key, Key Protect combines the strength of multiple algorithms to protect the privacy and the integrity of your encrypted data.

You cannot wrap a standard key, that is, a key created using the -s parameter (ibmcloud kp key create my-key-name -s).

ibmcloud kp key wrap KEY_ID_OR_ALIAS
-i, --instance-id INSTANCE_ID
For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-retrieve-instance-ID). 
 key_ring_ID Optional. The unique identifier of the key ring that the key belongs to. If unspecified, Hyper Protect Crypto Services searches for the key in every key ring that is associated with the specified instance. Therefore, it is suggested to specify the key ring ID for a more optimized request.<br><br>Note: The key ring ID of keys that are created without an x-kms-key-ring header is default. For more information, see [Managing key rings](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-managing-key-rings). 
 return_preference A header that alters server behavior for POST and DELETE operations. When you set the return_preference variable to return=minimal, the service returns a successful deletion response. When you set the variable to return=representation, the service returns both the key material and the key metadata. 



If the return_preference variable is set to return=representation, the details of the DELETE request are returned in the response entity-body.

The following JSON object shows a sample returned value.

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key+json",
"collectionTotal": 1
},
"resources": [
{
"id": "2291e4ae-a14c-4af9-88f0-27c0cb2739e2",
"type": "application/vnd.ibm.kms.key+json",
"aliases":
"alias-1",
"alias-2"
],
"name": "test-root-key",
"description": "...",
"state": 5,
"expirationDate": "2020-03-15T20:41:27Z",
The customization interface includes a collection of new HTTP methods that have the names POST /v1/customizations, POST /v1/customizations/{customization_id}, POST /v1/customizations/{customization_id}/words, and PUT /v1/customizations/{customization_id}/words/{word}. The service also provides a new GET /v1/pronunciation method that returns the pronunciation for any word and a new GET /v1/voices/{voice} method that returns detailed information about a specific voice. In addition, existing methods of the service's interface now accept custom model parameters as needed.

For more information about customization and its interface, see [Understanding customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro) and the [API & SDK reference](https://cloud.ibm.com/apidocs/text-to-speech).

The customization interface is a beta release that currently supports US English only. All customization methods and the GET /v1/pronunciation method can currently be used to create and manipulate custom models and word translations only in US English.

New Brazilian Portuguese voice: pt-BR_IsabelaVoice
: The service supports a new voice, pt-BR_IsabelaVoice, to synthesize audio in Brazilian Portuguese with a female voice. For more information, see [Languages and voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices).





 21 September 2015 

New mobile SDKs available
: Two new beta mobile Software Development Kits (SDKs) are available for the speech services. The SDKs enable mobile applications to interact with both the Text to Speech and Speech to Text services. You can use the SDKs to send text to the Text to Speech service and receive an audio response.



* The Watson Swift SDK is available from the [swift-sdk repository](https://github.com/watson-developer-cloud/swift-sdk) in the watson-developer-cloud namespace on GitHub.
You use the POST /v1/customizations/{customization_id}/corpora/{corpus_name} method to add a corpus to a custom model:

customization_id (required string)
: Specify the customization ID of the custom model to which the corpus is to be added.

corpus_name (required string)
: Specify a name for the corpus. Use a localized name that matches the language of the custom model and reflects the contents of the corpus.



* Include a maximum of 128 characters in the name.
* Do not use characters that need to be URL-encoded. For example, do not use spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, questions marks, and so on in the name. (The service does not prevent the use of these characters. But because they must be URL-encoded wherever used, their use is strongly discouraged.)
* Do not use the name of a corpus or grammar that has already been added to the custom model.
* Do not use the name user, which is reserved by the service to denote custom words that are added or modified by the user.
* Do not use the name base_lm or default_lm. Both names are reserved for future use by the service.



Pass the corpus text file as the required body of the request. The following example adds the corpus text file healthcare.txt to the custom model with the specified ID. The example names the corpus healthcare.

IBM Cloud

curl -X POST -u "apikey:{apikey}" --data-binary @healthcare.txt "{url}/v1/customizations/{customization_id}/corpora/healthcare"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --data-binary @healthcare.txt "{url}/v1/customizations/{customization_id}/corpora/healthcare"

The method also accepts an optional allow_overwrite query parameter that overwrites an existing corpus for a custom model. Use the parameter if you need to update a corpus file after you add it to a model.
clientID The unique identifier for your application. You can find this value in the credentials for your app as they're listed in Applications. 
 roleName The name that you want to assign to your role. 
 roleDescription A short phrase that describes what your role is meant to do. 
 applicationID The unique identifier for your application. You can find this value in the credentials for your app as they're listed in Applications. 
 scopes A JSON object of all the scopes that you want to apply to a role. 
 {: caption="Table 2. Required variables to call the /scopes endpoint" caption-side="top"} 



2. Optional: Confirm that the roles were created.

curl -X GET "https://<region>.appid.cloud.ibm.com/management/v4/<tenantID>/roles -H "accept: application/json"

The response looks similar to the following example:

{
"roles": [
{
"id": "12345678-1234-1234-1234-123456789012",
"name": "admin",
"description": "Can perform administrative tasks.",
"access":
{
"application_id": "de33d272-f8a7-4406-8fe8-ab28fd457be5",
"scopes":
"create",
"update",
"write",
"read"
]
}
]
}
{
"id": "123454231-1234-1234-3334-12345687012",
"name": "developer",
"description": "Can perform administrative tasks.",
"access":
{
"application_id": "de33d272-f8a7-4406-8fe8-ab28fd457be5",
"scopes":
"write",
"read"
]
Managing audio resources 

Acoustic model customization is available only for previous-generation models. It is not available for next-generation models.

The customization interface includes the POST /v1/acoustic_customizations/{customization_id}/audio/{audio_name} method, which is used to add an audio resource to a custom acoustic model. For more information, see [Add audio to the custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acousticaddAudio). The interface also includes the following methods for listing and deleting audio resources for a custom acoustic model.



 Listing audio resources for a custom acoustic model 

The customization interface provides two methods for listing information about the audio resources of a custom acoustic model:



* The GET /v1/acoustic_customizations/{customization_id}/audio method lists information about all audio resources that have been added to a custom model.
* The GET /v1/acoustic_customizations/{customization_id}/audio/{audio_name} method lists information about a specified audio resource for a custom model.



Both methods return the name of the audio resource plus the following additional information:



* duration is the length in seconds of the audio. For an archive file, the figure represents the accumulated duration of all of the audio files that are contained in the archive.
* details identifies the type of the resource: audio or archive. (The type is undetermined if the service cannot validate the resource, possibly because the user mistakenly passed a file that does not contain audio.) For an audio file, the details include the codec and frequency of the audio. For an archive file, they include its compression type.



Additionally, listing all audio resources for a model returns the total_minutes_of_audio summed over all of the valid audio resources for the model. You can use this value to determine whether the custom model has enough or too much audio to begin training.

The methods also list the status of the audio data. The status is important for checking the service's analysis of audio files in response to a request to add them to a custom model:
--environment_id ENVIRONMENT_ID (optional)
: Environment ID. If this value is not provided, name will automatically become the ID. Optional field - input either as a flag or from file.

--description DESCRIPTION (optional)
: Description of the environment. Optional field - input either as a flag or from file.

--tags TAGS (optional)
: Tags associated with the environment. Optional field - input either as a flag or from file.

--color_code COLOR_CODE (optional)
: Color code to distinguish the environment. The Hex code for the color. Optional field - input either as a flag or from file.

--file FILE
: Input through the file. File format Supported - JSON





 Example 

To create an environment with name Production_Environment using flags ([click here](https://cloud.ibm.com/docs/app-configuration-cli-plugin?topic=app-configuration-cli-plugin-app-configuration-cliac-fileinput) for using commands with --file flag), run the following command:

ibmcloud ac environment create --name Production_Environment --environment_id prodEnvironment --description sampleDesc --tags sampleTag --color_code "FF0000"



 Output 

The command returns the following output:

updated_time 2021-05-21T05:28:07.000Z
name Production_Environment
environment_id prodEnvironment
description sampleDesc
tags sampleTag
color_code FF0000
created_time 2021-05-21T05:28:07.000Z









 ibmcloud ac environment get 

You can get an environment detail, by using the command:

ibmcloud ac environment get --environment_id ENVIRONMENT_ID [--expand EXPAND] [--include INCLUDE]



 Command options 

--environment_id ENVIRONMENT_ID
: Environment ID

--expand EXPAND (optional)
: Expanded view of the item.

--include INCLUDE (optional)
: Include feature and property details in the response.





 Example
Store the following values in variables to be used in the API command:



* instance_id, which is the unique identifier of a service instance.
* resolver_id, which is the unique identifier of a custom resolver.
* location_id, which is the custom resolver location ID.
* X-Correlation-ID, which is a string that uniquely identifies a request.



3. When all variables are initiated, get the details of your custom resolver:

curl -X DELETE https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/locations/ bf6b4f83-bf0b-47c2-8bdf-e7fbd92db2c6 -H 'Authorization: Bearer xxxxxx'
What is the order number?

![Shows the Ask for order number node details.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-ass-ask-for-order-number.png)
11. Click ![Close](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/close.png) to close the edit view.

Now, add another child node that informs the user that you are canceling the order.
12. Click the More![More options](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon on the Ask for order number node, and then select Add child node.
13. Type @order_number into the If assistant recognizes field of this node.
14. Open the context editor. Click the More![More options](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon, and select Open context editor.
15. Enter the following context variable name and value pair:



Order number context variable details

 Variable Value 

 $ordernumber <? @order_number.literal ?> 



The context variable value (<? @order_number.literal ?>) is a SpEL expression that captures the number that the user specifies that matches the pattern defined by the @order_number pattern entity. It saves it to the $ordernumber variable.
16.
--environment_id ENVIRONMENT_ID (optional)
: Environment ID. If this value is not provided, name will automatically become the ID. Optional field - input either as a flag or from file.

--description DESCRIPTION (optional)
: Description of the environment. Optional field - input either as a flag or from file.

--tags TAGS (optional)
: Tags associated with the environment. Optional field - input either as a flag or from file.

--color_code COLOR_CODE (optional)
: Color code to distinguish the environment. The Hex code for the color. Optional field - input either as a flag or from file.

--file FILE
: Input through the file. File format Supported - JSON





 Example 

To create an environment with name Production_Environment using flags ([click here](https://cloud.ibm.com/docs/app-configuration?topic=app-configuration-cli-plugin-app-configuration-cliac-fileinput) for using commands with --file flag), run the following command:

ibmcloud ac environment create --name Production_Environment --environment_id prodEnvironment --description sampleDesc --tags sampleTag --color_code "FF0000"



 Output 

The command returns the following output:

updated_time 2021-05-21T05:28:07.000Z
name Production_Environment
environment_id prodEnvironment
description sampleDesc
tags sampleTag
color_code FF0000
created_time 2021-05-21T05:28:07.000Z









 ibmcloud ac environment get 

You can get an environment detail, by using the command:

ibmcloud ac environment get --environment_id ENVIRONMENT_ID [--expand EXPAND] [--include INCLUDE]



 Command options 

--environment_id ENVIRONMENT_ID
: Environment ID

--expand EXPAND (optional)
: Expanded view of the item.

--include INCLUDE (optional)
: Include feature and property details in the response.





 Example
The IDs are specified in a doc_ids parameter, or within a JSON document supplied as part of the original request.

See the following example application of the _doc_ids filter by using HTTP:

POST $SERVICE_URL/$DATABASE/_changes?filter=_doc_ids HTTP/1.1

See the following example applications of the _doc_ids filter:



* Curl
* Java
* Node
* Python
* Go



curl -X POST "$SERVICE_URL/orders/_changes?filter=_doc_ids" -H "Content-Type: application/json" -d '{"doc_ids": ["ExampleID"]}'

import java.util.Arrays;

import com.ibm.cloud.cloudant.v1.Cloudant;
import com.ibm.cloud.cloudant.v1.model.ChangesResult;
import com.ibm.cloud.cloudant.v1.model.PostChangesOptions;

Cloudant service = Cloudant.newInstance();

PostChangesOptions changesOptions = new PostChangesOptions.Builder()
.db("orders")
.filter("_doc_ids")
.docIds(Arrays.asList("ExampleID"))
.build();

ChangesResult response =
service.postChanges(changesOptions).execute()
.getResult();

System.out.println(response);

const { CloudantV1 } = require('@ibm-cloud/cloudant');

const service = CloudantV1.newInstance({});

service.postChanges({
db: 'orders',
filter: '_doc_ids',
docIds: ['ExampleID']
}).then(response => {
console.log(response.result);
});

from ibmcloudant.cloudant_v1 import CloudantV1

service = CloudantV1.new_instance()
Understanding customization 

The IBM Watson® Speech to Text service offers a customization interface that you can use to augment its speech recognition capabilities. You can use customization to improve the accuracy of speech recognition requests by customizing a base model for your domain and audio.

The customization interface supports both custom language models and custom acoustic models. The interfaces for both types of custom model are similar and straightforward to use. Using either type of custom model with a recognition request is also straightforward: You specify the customization ID of the model with the request.

Speech recognition works the same with or without a custom model. When you use a custom model for speech recognition, you can use all of the parameters that are normally available with a recognition request. For more information about all available parameters, see the [Parameter summary](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-summary).

IBM Cloud

You must have the Plus, Standard, or Premium pricing plan to use language model or acoustic model customization. Users of the Lite plan cannot use the customization interface, but they can upgrade to the Plus plan to gain access to customization. For more information, see the [Pricing FAQs](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-faq-pricing).



 Language model customization 

For more information about the languages and models that support language model customization and their level of support (generally available or beta), see [Language support for customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).

The service was developed with a broad, general audience in mind. The service's base vocabulary contains many words that are used in everyday conversation. Its models provide sufficiently accurate recognition for many applications. But they can lack knowledge of specific terms that are associated with particular domains.

The language model customization interface can improve the accuracy of speech recognition for domains such as medicine, law, information technology, and others. By using language model customization, you can expand and tailor the vocabulary of a base model to include domain-specific terminology.
Use Case 2: Customizing security groups and security group policies when creating a new resource 

The following diagram illustrates the potential customization options when you create a new resource. If a User creates a new resource and take no further action to specify a security group to attach it to, their new resource is assigned to the VPC's default security group. This default security group will take on the default security group policy or follow a customized policy previously configured by members of your account.

If the User decides to assign the new resource to a new security group, the new security group is automatically assigned the default security group policy. Then the User can choose to take no further action, or choose to customize policy rules to create a custom security group policy for their new security group. These new rules also apply to the new resource created and assigned to the new security group:

Zoom

![Security group and security group policy customization options when creating a new resource](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/vpc/images/sg-customization-options.svg)

Figure 2. Security group and security group policy customization options when creating a new resource





 Use Case 3: Allow traffic between members of a security group 

The more conventional way to set up your security group policy is to control traffic to and from your targets with specific rules that filter by IP addresses and ports.

A more dynamic way you can set up your security group policy is to allow all inbound traffic from other targets that are also part of the security group. When you permit traffic between members of a security group, as resources are added or deleted from the security group, you don't have to set up individual permissions between each current member and each new member of a security group.

For example, say you have host A and host B in a security group, and you add a new host C. Normally, you would have to perform maintainance to allow host A and host B to send traffic to and from host C after you add host C to the security group.