vllm.entrypoints.speech_to_text.translation.protocol ¶
TranslationRequest ¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/speech_to_text/translation/protocol.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
file instance-attribute ¶
The audio file object (not file name) to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
hotwords class-attribute instance-attribute ¶
hotwords: str | None = None
hotwords refers to a list of important words or phrases that the model should pay extra attention to during transcription.
include_stop_str_in_output class-attribute instance-attribute ¶
include_stop_str_in_output: bool = False
Whether to include the stop strings in output text.
language class-attribute instance-attribute ¶
language: str | None = None
The language of the input audio we translate from.
Supplying the input language in ISO-639-1 format will improve accuracy.
length_penalty class-attribute instance-attribute ¶
length_penalty: float = 1.0
Length penalty to be used for beam search.
max_completion_tokens class-attribute instance-attribute ¶
max_completion_tokens: int | None = None
The maximum number of tokens to generate.
prompt class-attribute instance-attribute ¶
prompt: str = Field(default='')
An optional text to guide the model's style or continue a previous audio segment.
The prompt should match the audio language.
response_format class-attribute instance-attribute ¶
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt.
seed class-attribute instance-attribute ¶
seed: int | None = Field(None, ge=min, le=max)
The seed to use for sampling.
stream class-attribute instance-attribute ¶
stream: bool | None = False
Custom field not present in the original OpenAI definition. When set, it will enable output to be streamed in a similar fashion as the Chat Completion endpoint.
temperature class-attribute instance-attribute ¶
temperature: float = Field(default=0.0)
The sampling temperature, between 0 and 1.
Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused / deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
TranslationResponse ¶
TranslationResponseVerbose ¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/speech_to_text/translation/protocol.py
segments class-attribute instance-attribute ¶
segments: list[TranslationSegment] | None = None
Segments of the translated text and their corresponding details.
words class-attribute instance-attribute ¶
words: list[TranslationWord] | None = None
Extracted words and their corresponding timestamps.
TranslationSegment ¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/speech_to_text/translation/protocol.py
avg_logprob instance-attribute ¶
avg_logprob: float
Average logprob of the segment.
If the value is lower than -1, consider the logprobs failed.
compression_ratio instance-attribute ¶
compression_ratio: float
Compression ratio of the segment.
If the value is greater than 2.4, consider the compression failed.
no_speech_prob class-attribute instance-attribute ¶
no_speech_prob: float | None = None
Probability of no speech in the segment.
If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.
TranslationWord ¶
Bases: OpenAIBaseModel