vania-janet/multiturn-rag-retrieval-data huggingface dataset:
The acoustic model customization interface can adapt a base model to your environment and speakers. You create a custom acoustic model and add audio data (audio resources) that closely match the acoustic signature of the audio that you want to transcribe. Once you train the custom acoustic model with your audio resources, you can use it for customized speech recognition.

The length of time that it takes the service to train the custom model depends on how much audio data the model contains. In general, training takes twice the length of the cumulative audio. The time and effort that are needed to create a custom model depend on the audio data that you have available for the model. They also on whether you use transcriptions of the audio.

For more information about getting started with acoustic model customization, see



* [Creating a custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic)
* [Using a custom acoustic model for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acousticUse)







 Grammars 

For more information about the languages and models that support grammars 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).

Custom language models allow you to expand the service's base vocabulary. Grammars enable you to restrict the words that the service can recognize from that vocabulary. When you use a grammar with a custom language model for speech recognition, the service can recognize only words, phrases, and strings that are recognized by the grammar. Because the grammar defines a limited search space for valid matches, the service can deliver results faster and more accurately.

You add a grammar to a custom language model and train the model just as you do for a corpus. Unlike a corpus, however, you must explicitly specify that a grammar is to be used with a custom model during speech recognition.

For more information about getting started with grammars, see
* undetermined indicates that the service encountered an error while processing the corpus. The information that is returned for the corpus includes an error message that offers guidance for correcting the error.

For example, the corpus might be invalid, or you might have tried to add a corpus with the same name as an existing corpus. You can try to add the corpus again and include the allow_overwrite parameter with the request. You can also delete the corpus and then try adding it again.





 List all corpora example 

The following example lists all corpora for the custom model with the specified customization ID:

IBM Cloud

curl -X GET -u "apikey:{apikey}" "{url}/v1/customizations/{customization_id}/corpora"

IBM Cloud Pak for Data

curl -X GET --header "Authorization: Bearer {token}" "{url}/v1/customizations/{customization_id}/corpora"

Three corpora were added to the custom model. The service successfully analyzed corpus1. It is still analyzing corpus2, and its analysis of corpus3 failed. Because the corpora were added to a custom model that is based on a previous-generation model, the out_of_vocabulary_words field shows the number of OOV words that the service extracted from the first corpus. The field will show the number of OOV words that are extracted from corpus2 when it is successfully analyzed. Analysis of corpus3 failed, so no OOV words were extracted.

{
"corpora": [
{
"name": "corpus1",
"total_words": 5037,
"out_of_vocabulary_words": 401,
"status": "analyzed"
},
{
"name": "corpus2",
"total_words": 0,
"out_of_vocabulary_words": 0,
"status": "being_processed"
},
{
"name": "corpus3",
"total_words": 0,
"out_of_vocabulary_words": 0,
Proximity rules can ensure that these phrases are extracted while excluding sentences or phrases that coincidentally include the target terms, for example, "The red car passed a house near the brick yard".



1. Right-click an extractor on the canvas and under one of the Add submenus, click Proximity Rule.
2. In the format minimum-maximum, specify the minimum and maximum number of words, special characters, or values to allow between terms. By default, the proximity pattern is set to match the number of tokens between the two numbers you specify in your range. If the desired proximity does not vary, you can change the setting. For example, enter 0-2.
3. Select the new proximity rule. The Extractor Properties opens to the Settings tab where you can change the number range or convert to an exact number of tokens.



Example 1:



1. Create a dictionary called Clerical title that includes terms such as Rabbi, Father, and Archbishop.
2. Drag the Person extractor to right side of the Clerical title dictionary so that the new sequence will find titles followed by names. When you release the mouse button, a sequence object is displayed on the canvas.
3. Right-click Clerical title and click Add After > Proximity Rule. To capture terms such as Archbishop of Canterbury, Robert Runcie, specify the minimum and maximum number of tokens between words, in this case 0-5.
4. Click the sequence on the canvas and then under Extractor Properties, open the General tab if it doesn't open automatically. Rename the sequence Clerics.

![Clerics extractor](https://cloud.ibm.com/docs-content/v1/content/148d3bd95f946aa1bb53ea1540475f522e6b61c9/watson-knowledge-studio-data/images/clerics.jpg)



Example 2:

As a second example, select tweets that refer to Twitter names of industry analysts with a big data term.
Satellite Link tunnel The Satellite Link tunnel server creates a secure TLS connection to the Satellite Link connector that runs on the control plane worker nodes in your Satellite location. Three tunnels are created between the tunnel server and the connector to support redundancy across the three availability zones of your location. All communication that leaves and enters your location is proxied by the Link tunnel server, and the connection metadata captured and monitored by IBM to detect malicious activity. To control the network connections between the workloads that run in your location and the IBM Cloud multizone metro that manages your location, you can set up Satellite Link endpoints. For more information, see [Connecting your Satellite location and IBM Cloud with endpoints](https://cloud.ibm.com/docs/satellite?topic=satellite-link-location-cloud). 
 IBM Cloud Monitoring The IBM Cloud Monitoring component monitors the compute capacity in your Satellite location and the components that run in your Satellite control plane to detect issues and automatically resolve them if possible. These actions can include assigning additional hosts to the control plane or restart components that keep on failing. For issues that cannot be resolved, IBM Site Reliability Engineers are automatically informed for further investigation. 
 Satellite Config With Satellite Config, you can consistently deploy Kubernetes resource configurations across Red Hat® OpenShift® on IBM Cloud® clusters that run on the infrastructure of your Satellite location or in IBM Cloud. You can monitor the health of these resources by using the location dashboard. For more information, see [Deploying Kubernetes resources across Satellite clusters](https://cloud.ibm.com/docs/satellite?topic=satellite-setup-clusters-satconfig). 
 IBM Cloud Secrets Manager With IBM Cloud Secrets Manager, you can create secrets dynamically and lease them to applications while you control access from a single location. Built on open source HashiCorp Vault, IBM Cloud Secrets Manager helps you get the data isolation of a dedicated environment with the benefits of a public cloud. For more information, see [Getting started with IBM Cloud Secrets Manager](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-getting-started). 







 Latency requirements 

Review the network latency requirements for the hosts that you add to your IBM Cloud Satellite location.
When you add a grammar file to a custom language model, the service parses the grammar to determine whether the grammar recognizes any words that are not already part of the service's base vocabulary. Such words are referred to as out-of-vocabulary (OOV) words. The service adds OOV words to the custom model's words resource. The purpose of the words resource is to define words that are not already present in the service's vocabulary.

Definitions in the words resource tell the service how to transcribe the OOV words. The information includes a sounds_like field that tells the service how the word is pronounced, a display_as field that tells the service how to display the word, and a source field that indicates how the word was added to the custom model. For more information about the words resource and OOV words, see [The words resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWordswordsResource).

After you add a grammar to a custom model, it is good practice to examine the OOV words in the model's words resource to verify their sounds-like pronunciations. Not all grammars have OOV words, but verifying the words resource is generally a good idea. To check the words of the custom model after you add a grammar, use the following methods:



* Use the GET /v1/customizations/{customization_id}/words method to list all of the words from a custom model. Pass the value grammars with the method's word_type parameter to list only words that were added from grammars.
* Use the GET /v1/customizations/{customization_id}/words/{word_name} method to view an individual word from a model.



Verify that the sounds-like pronunciations of the words are accurate and correct. Also look for typographical and other errors in the words themselves. For more information about validating and correcting the words in a custom model, see [Validating a words resource for previous-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWordsvalidateModel).
Master components Description 

 Satellite Link tunnel The Satellite Link tunnel server creates a secure TLS connection to the Satellite Link connector that runs on the control plane worker nodes in your Satellite location. Three tunnels are created between the tunnel server and the connector to support redundancy across the three availability zones of your location. All communication that leaves and enters your location is proxied by the Link tunnel server, and the connection metadata that is captured and monitored by IBM to detect malicious activity. To control the network connections between the workloads that run in your location and the IBM Cloud multizone metro that manages your location, you can set up Satellite Link endpoints. For more information, see [Connecting your Satellite location and IBM Cloud with endpoints](https://cloud.ibm.com/docs/satellite?topic=satellite-link-location-cloud). 
 IBM Cloud Monitoring The IBM Cloud Monitoring component monitors the compute capacity in your Satellite location and the components that run in your Satellite control plane to detect issues and automatically resolve them if possible. These actions can include assigning more hosts to the control plane or restart components that keep on failing. For issues that cannot be resolved, IBM Site Reliability Engineers are automatically informed for further investigation. 
 Satellite Config Based on the [Razee open source project](https://github.com/razee-io/Razee), Satellite Config is a continuous delivery tool that you can use to consistently roll out versions of your apps across Red Hat OpenShift on IBM Cloud clusters in Satellite locations. For more information, see [Deploying Red Hat OpenShift on IBM Cloud resources across clusters with Satellite configurations](https://cloud.ibm.com/docs/satellite?topic=satellite-setup-clusters-satconfig). 







 Satellite location components 

A location is a representation of an environment in your on-premises data center that you want to bring IBM Cloud services to so that you can run workloads in your own environment. You create the location based on at least three separate zones of your backing infrastructure environment, and attach host machines from across these zones in your infrastructure to the location.
All back-end members of that pool must support proxy protocol for the data path to work. You can choose the version of proxy protocol header (version 1 or version 2) when enabling this setting. This setting is disabled by default if not specified. With this setting, the back-end servers can get the client IP and port information that the load balancer sets in the proxy protocol header.





 Use case 2: Client connects to a proxy or proxy chain, which then connects to the load balancer using proxy protocol 

Zoom

![Proxy Protocol Listener](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/vpc/images/VPC-LBaaS-Proxy-Protocol-Listener.png)

Proxy Protocol Listener

If the Application Load Balancer for VPC is receiving traffic from a proxy (or a proxy chain) that uses proxy protocol, the listener must have proxy protocol that is enabled so that it can parse the origin client information that is contained in the proxy protocol headers. This setting is disabled by default, if not specified. Because the load balancer can detect the version of the proxy protocol header and parse it correctly, you don't have to specify which version of proxy protocol is being used to send traffic to the ALB.

When proxy protocol is enabled for a front-end listener, all traffic coming to that front-end port is expected to be proxy protocol traffic. If any of the connections do not contain the proper proxy protocol headers, they won't be established. To forward this client information to the back-end server pool, you must enable proxy protocol for the pool. Similar to use case 1, you must select version 1 or version 2 depending on what version of proxy protocol the back-end servers are configured to use. You can also choose to not forward this client information to the back-end servers if they are not capable of processing this information, and this information is dropped at the load balancer.
Next-generation languages and models 

The IBM Watson® Speech to Text service supports a growing collection of next-generation models that improve upon the speech recognition capabilities of the service's previous-generation models. The model indicates the language in which the audio is spoken and the rate at which it is sampled. Next-generation models have higher throughput than the previous-generation models, so the service can return transcriptions more quickly. Next-generation models also provide noticeably better transcription accuracy.

When you use next-generation models, the service analyzes audio bidirectionally. Using deep neural networks, the model analyzes and extracts information from the audio. The model then evaluates the information forwards and backwards to predict the transcription, effectively "listening" to the audio twice.

With the additional information and context afforded by bidirectional analysis, the service can make smarter hypotheses about the words spoken in the audio. Despite the added analysis, recognition with next-generation models is more efficient than with previous-generation models, so the service delivers results faster and with more accuracy. Most next-generation models also offer a low-latency option to receive results even faster, though low latency might impact transcription accuracy.

In addition to providing greater transcription accuracy, the models have the ability to hypothesize words that are not in the base language model and that it has not encountered in training. This capability can decrease the need for customization of domain-specific terms. A model does not need to contain a specific vocabulary term to predict that word.



* For an overview of the next-generation models and their technology, see [Next-Generation Watson Speech to Text](https://medium.com/ibm-watson-speech-services/next-generation-watson-speech-to-text-650fd66d95d0).
* For more information about the technology that underlies the next-generation models, see [Advancing RNN Transducer Technology for Speech Recognition](https://arxiv.org/abs/2103.09935).
In other words, if you have one node, you need that node available to have a quorum, because the majority of one is one. Similarly, if you have two nodes, you will need both available, since the majority of two is two (for this reason, a configuration of two nodes is discouraged; there is no advantage to a two node configuration). In a similar vein, the majority of three is two, the majority of four is three, the majority of five is three, and so on.

While satisfying the quorum will make sure the ordering service is functioning, production networks also have to think about deployment configurations that are highly available (in other words, configurations in which the loss of a certain number of nodes can be tolerated by the system). Typically, this means tolerating two nodes failing: one node going down during a normal maintenance cycle, and another going down for any other reason (such as a power outage or error).

This is why, by default, the console offers two options: one node or five nodes. Recall that the majority of five is three. This means that in a five node configuration, the loss of two nodes can be tolerated. If your configuration features four nodes, only one node can be down for any reason before another node going down means a quorum has been lost and the ordering service will stop processing transactions.

For this reason, it is considered a best practice to have an odd number of nodes in an ordering service. There is nothing wrong with an even number of nodes, but they add costs without making the ordering service more highly available.

Because the number of nodes needed for a quorum is updated automatically when nodes are added to the consenter set, it is a best practice to make sure that all of the nodes in the consenter set are servicing the channel before attempting to add a new node. This is because the consenter set is updated before the node has finished provisioning. For example, if you have three nodes servicing a channel, you will have a quorum as long as two nodes are up. When attempting to add a new node, the consenter set will index to three nodes being needed (out of four).
The following example adds the grammar file named confirm.abnf to the custom model with the specified ID. The example names the grammar confirm-abnf.

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/srgs" --data-binary @confirm.abnf "{url}/v1/customizations/{customization_id}/grammars/confirm-abnf"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --header "Content-Type: application/srgs" --data-binary @confirm.abnf "{url}/v1/customizations/{customization_id}/grammars/confirm-abnf"

The method also accepts an optional allow_overwrite query parameter that you can include to overwrite an existing grammar with the same name. Use the parameter if you need to update a grammar after you add it to a model.

The method is asynchronous. It can take a few seconds or minutes for the service to analyze the grammar, depending on the size of the grammar and the current load on the service. For information about checking the status of a grammar, see [Monitoring the add grammar request](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAddmonitorGrammar).

You can add any number of grammars to a custom model by calling the method once for each grammar file. The addition of one grammar must be fully complete before you can add another.



 Monitoring the add grammar request 

The service returns a 201 response code if the grammar is valid. It then asynchronously processes the contents of the grammar and automatically extracts new words that the grammar can recognize. You cannot submit requests to add more data resources to a custom model, or to train the model, until the service's analysis of the grammar for the current request completes.

To determine the status of the analysis, use the GET /v1/customizations/{customization_id}/grammars/{grammar_name} method to poll the status of the grammar.
If your application is not listed, repeat Steps 7 and 8, making sure that you entered the correct details in [manifest.yml](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-getting-startedstep-8-push-the-app-to-sitedatakeywordcloudnotm).





 Step 10: Use the app 

Now, when you visit <route>.{region}.cf.appdomain.cloud/ you can see the contents of your Messages for RabbitMQ collection. As you add words and their definitions, they are added to the database and displayed. If you stop and restart the app, you see any words and definitions that were already added are now listed.





 Running the app locally 

Instead of pushing the app into IBM Cloud you can run it locally to test the connection to your Messages for RabbitMQ service instance. To connect to the service, you need to create a set of service credentials.



* Select Service Credentials from the main menu to open the Service Credentials view.
* Click New Credential.
* Choose a name for your credentials and click Add.
* Your new credentials are now listed. Click View credentials in the corresponding row of the table to view the credentials, and click the Copy icon to copy your credentials.
* In your editor of choice, create a new file with the following, inserting your credentials as shown:



{
"services": {
"messages-for-rabbitmq": [
{
"credentials": INSERT YOUR CREDENTIALS HERE
}
]
}
}



* Save the file as vcap-local.json in the directory where the sample app is located.



To avoid accidentally exposing your credentials when you push an application to GitHub or IBM Cloud, make sure that the file that contains your credentials is listed in the relevant ignore file. If you open .cfignore and .gitignore in your application directory, you can see that vcap-local.json is listed in both. It is not included in the files that are uploaded when you push the app to either GitHub or IBM Cloud.

Now start the local server.