1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/speech/v1/cloud_speech.proto 18 19 package com.google.cloud.speech.v1; 20 21 public interface SpeechContextOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1.SpeechContext) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * A list of strings containing words and phrases "hints" so that 31 * the speech recognition is more likely to recognize them. This can be used 32 * to improve the accuracy for specific words and phrases, for example, if 33 * specific commands are typically spoken by the user. This can also be used 34 * to add additional words to the vocabulary of the recognizer. See 35 * [usage limits](https://cloud.google.com/speech-to-text/quotas#content). 36 * List items can also be set to classes for groups of words that represent 37 * common concepts that occur in natural language. For example, rather than 38 * providing phrase hints for every month of the year, using the $MONTH class 39 * improves the likelihood of correctly transcribing audio that includes 40 * months. 41 * </pre> 42 * 43 * <code>repeated string phrases = 1;</code> 44 * 45 * @return A list containing the phrases. 46 */ getPhrasesList()47 java.util.List<java.lang.String> getPhrasesList(); 48 /** 49 * 50 * 51 * <pre> 52 * A list of strings containing words and phrases "hints" so that 53 * the speech recognition is more likely to recognize them. This can be used 54 * to improve the accuracy for specific words and phrases, for example, if 55 * specific commands are typically spoken by the user. This can also be used 56 * to add additional words to the vocabulary of the recognizer. See 57 * [usage limits](https://cloud.google.com/speech-to-text/quotas#content). 58 * List items can also be set to classes for groups of words that represent 59 * common concepts that occur in natural language. For example, rather than 60 * providing phrase hints for every month of the year, using the $MONTH class 61 * improves the likelihood of correctly transcribing audio that includes 62 * months. 63 * </pre> 64 * 65 * <code>repeated string phrases = 1;</code> 66 * 67 * @return The count of phrases. 68 */ getPhrasesCount()69 int getPhrasesCount(); 70 /** 71 * 72 * 73 * <pre> 74 * A list of strings containing words and phrases "hints" so that 75 * the speech recognition is more likely to recognize them. This can be used 76 * to improve the accuracy for specific words and phrases, for example, if 77 * specific commands are typically spoken by the user. This can also be used 78 * to add additional words to the vocabulary of the recognizer. See 79 * [usage limits](https://cloud.google.com/speech-to-text/quotas#content). 80 * List items can also be set to classes for groups of words that represent 81 * common concepts that occur in natural language. For example, rather than 82 * providing phrase hints for every month of the year, using the $MONTH class 83 * improves the likelihood of correctly transcribing audio that includes 84 * months. 85 * </pre> 86 * 87 * <code>repeated string phrases = 1;</code> 88 * 89 * @param index The index of the element to return. 90 * @return The phrases at the given index. 91 */ getPhrases(int index)92 java.lang.String getPhrases(int index); 93 /** 94 * 95 * 96 * <pre> 97 * A list of strings containing words and phrases "hints" so that 98 * the speech recognition is more likely to recognize them. This can be used 99 * to improve the accuracy for specific words and phrases, for example, if 100 * specific commands are typically spoken by the user. This can also be used 101 * to add additional words to the vocabulary of the recognizer. See 102 * [usage limits](https://cloud.google.com/speech-to-text/quotas#content). 103 * List items can also be set to classes for groups of words that represent 104 * common concepts that occur in natural language. For example, rather than 105 * providing phrase hints for every month of the year, using the $MONTH class 106 * improves the likelihood of correctly transcribing audio that includes 107 * months. 108 * </pre> 109 * 110 * <code>repeated string phrases = 1;</code> 111 * 112 * @param index The index of the value to return. 113 * @return The bytes of the phrases at the given index. 114 */ getPhrasesBytes(int index)115 com.google.protobuf.ByteString getPhrasesBytes(int index); 116 117 /** 118 * 119 * 120 * <pre> 121 * Hint Boost. Positive value will increase the probability that a specific 122 * phrase will be recognized over other similar sounding phrases. The higher 123 * the boost, the higher the chance of false positive recognition as well. 124 * Negative boost values would correspond to anti-biasing. Anti-biasing is not 125 * enabled, so negative boost will simply be ignored. Though `boost` can 126 * accept a wide range of positive values, most use cases are best served with 127 * values between 0 and 20. We recommend using a binary search approach to 128 * finding the optimal value for your use case. 129 * </pre> 130 * 131 * <code>float boost = 4;</code> 132 * 133 * @return The boost. 134 */ getBoost()135 float getBoost(); 136 } 137