Hint Boost. Positive value will increase the probability that a specific
phrase will be recognized over other similar sounding phrases. The higher
the boost, the higher the chance of false positive recognition as well.
Negative boost values would correspond to anti-biasing. Anti-biasing is not
enabled, so negative boost will simply be ignored. Though boost can
accept a wide range of positive values, most use cases are best served with
values between 0 and 20. We recommend using a binary search approach to
finding the optimal value for your use case.
A list of strings containing words and phrases "hints" so that
the speech recognition is more likely to recognize them. This can be used
to improve the accuracy for specific words and phrases, for example, if
specific commands are typically spoken by the user. This can also be used
to add additional words to the vocabulary of the recognizer. See
usage limits.
List items can also be set to classes for groups of words that represent
common concepts that occur in natural language. For example, rather than
providing phrase hints for every month of the year, using the $MONTH class
improves the likelihood of correctly transcribing audio that includes
months.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSpeechContext\u003c/code\u003e class, part of the Google Cloud Speech v1p1beta1 API, offers a way to provide hints to the speech recognizer to improve recognition of specific words and phrases.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSpeechContext\u003c/code\u003e allows setting a \u003ccode\u003eBoost\u003c/code\u003e property (a float value) to increase the probability of recognizing particular phrases, with higher values increasing the chance of recognition but potentially increasing false positives.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePhrases\u003c/code\u003e property, a list of strings, allows defining specific words or phrases that the speech recognizer should favor, including the option to use classes for common concepts like "$MONTH".\u003c/p\u003e\n"],["\u003cp\u003eThis class has two constructors, one default and another that copies values from an existing \u003ccode\u003eSpeechContext\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, inheriting core functionalities from the .NET framework.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Speech v1p1beta1 API - Class SpeechContext (3.0.0-beta09)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta09 (latest)](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/latest/Google.Cloud.Speech.V1P1Beta1.SpeechContext)\n- [3.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/3.0.0-beta08/Google.Cloud.Speech.V1P1Beta1.SpeechContext)\n- [2.0.0-beta09](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/2.0.0-beta09/Google.Cloud.Speech.V1P1Beta1.SpeechContext) \n\n public sealed class SpeechContext : IMessage\u003cSpeechContext\u003e, IEquatable\u003cSpeechContext\u003e, IDeepCloneable\u003cSpeechContext\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Speech v1p1beta1 API class SpeechContext.\n\nProvides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SpeechContext \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SpeechContext](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/latest/Google.Cloud.Speech.V1P1Beta1.SpeechContext), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SpeechContext](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/latest/Google.Cloud.Speech.V1P1Beta1.SpeechContext), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SpeechContext](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/latest/Google.Cloud.Speech.V1P1Beta1.SpeechContext), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Speech.V1P1Beta1](/dotnet/docs/reference/Google.Cloud.Speech.V1P1Beta1/latest/Google.Cloud.Speech.V1P1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.Speech.V1P1Beta1.dll\n\nConstructors\n------------\n\n### SpeechContext()\n\n public SpeechContext()\n\n### SpeechContext(SpeechContext)\n\n public SpeechContext(SpeechContext other)\n\nProperties\n----------\n\n### Boost\n\n public float Boost { get; set; }\n\nHint Boost. Positive value will increase the probability that a specific\nphrase will be recognized over other similar sounding phrases. The higher\nthe boost, the higher the chance of false positive recognition as well.\nNegative boost values would correspond to anti-biasing. Anti-biasing is not\nenabled, so negative boost will simply be ignored. Though `boost` can\naccept a wide range of positive values, most use cases are best served with\nvalues between 0 and 20. We recommend using a binary search approach to\nfinding the optimal value for your use case.\n\n### Phrases\n\n public RepeatedField\u003cstring\u003e Phrases { get; }\n\nA list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech-to-text/quotas#content).\n\nList items can also be set to classes for groups of words that represent\ncommon concepts that occur in natural language. For example, rather than\nproviding phrase hints for every month of the year, using the $MONTH class\nimproves the likelihood of correctly transcribing audio that includes\nmonths."]]