Class AudioTranscriptionCreateParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class AudioTranscriptionCreateParams implements Params
Transcribes audio into the input language.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
AudioTranscriptionCreateParams.Body
public final class
AudioTranscriptionCreateParams.Builder
A builder for AudioTranscriptionCreateParams.
public final class
AudioTranscriptionCreateParams.TimestampGranularity
-
Method Summary
Modifier and Type Method Description final ByteArray
file()
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. final AudioModel
model()
ID of the model to use. final Optional<String>
language()
The language of the input audio. final Optional<String>
prompt()
An optional text to guide the model's style or continue a previous audio segment. final Optional<AudioResponseFormat>
responseFormat()
The format of the output, in one of these options: json
,text
,srt
,verbose_json
, orvtt
.final Optional<Double>
temperature()
The sampling temperature, between 0 and 1. final Optional<List<AudioTranscriptionCreateParams.TimestampGranularity>>
timestampGranularities()
The timestamp granularities to populate for this transcription. final MultipartField<ByteArray>
_file()
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. final MultipartField<AudioModel>
_model()
ID of the model to use. final MultipartField<String>
_language()
The language of the input audio. final MultipartField<String>
_prompt()
An optional text to guide the model's style or continue a previous audio segment. final MultipartField<AudioResponseFormat>
_responseFormat()
The format of the output, in one of these options: json
,text
,srt
,verbose_json
, orvtt
.final MultipartField<Double>
_temperature()
The sampling temperature, between 0 and 1. final MultipartField<List<AudioTranscriptionCreateParams.TimestampGranularity>>
_timestampGranularities()
The timestamp granularities to populate for this transcription. final Headers
_additionalHeaders()
final QueryParams
_additionalQueryParams()
Headers
_headers()
The full set of headers in the parameters, including both fixed and additional headers. QueryParams
_queryParams()
The full set of query params in the parameters, including both fixed and additional query params. final AudioTranscriptionCreateParams.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static AudioTranscriptionCreateParams.Builder
builder()
-
-
Method Detail
-
file
final ByteArray file()
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
model
final AudioModel model()
ID of the model to use. Only
whisper-1
(which is powered by our open source Whisper V2 model) is currently available.
-
language
final Optional<String> language()
The language of the input audio. Supplying the input language in ISO-639-1 (e.g.
en
) format will improve accuracy and latency.
-
prompt
final Optional<String> prompt()
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
-
responseFormat
final Optional<AudioResponseFormat> responseFormat()
The format of the output, in one of these options:
json
,text
,srt
,verbose_json
, orvtt
.
-
temperature
final Optional<Double> temperature()
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 and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
-
timestampGranularities
final Optional<List<AudioTranscriptionCreateParams.TimestampGranularity>> timestampGranularities()
The timestamp granularities to populate for this transcription.
response_format
must be setverbose_json
to use timestamp granularities. Either or both of these options are supported:word
, orsegment
. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
-
_file
final MultipartField<ByteArray> _file()
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
_model
final MultipartField<AudioModel> _model()
ID of the model to use. Only
whisper-1
(which is powered by our open source Whisper V2 model) is currently available.
-
_language
final MultipartField<String> _language()
The language of the input audio. Supplying the input language in ISO-639-1 (e.g.
en
) format will improve accuracy and latency.
-
_prompt
final MultipartField<String> _prompt()
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
-
_responseFormat
final MultipartField<AudioResponseFormat> _responseFormat()
The format of the output, in one of these options:
json
,text
,srt
,verbose_json
, orvtt
.
-
_temperature
final MultipartField<Double> _temperature()
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 and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
-
_timestampGranularities
final MultipartField<List<AudioTranscriptionCreateParams.TimestampGranularity>> _timestampGranularities()
The timestamp granularities to populate for this transcription.
response_format
must be setverbose_json
to use timestamp granularities. Either or both of these options are supported:word
, orsegment
. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
toBuilder
final AudioTranscriptionCreateParams.Builder toBuilder()
-
builder
final static AudioTranscriptionCreateParams.Builder builder()
-
-
-
-