Class AudioTranscriptionCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class AudioTranscriptionCreateParams.Body.BuilderA builder for Body.
-
-
Method Summary
Modifier and Type Method Description final AudioTranscriptionCreateParams.Body.Builderfile(InputStream 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 AudioTranscriptionCreateParams.Body.Builderfile(MultipartField<InputStream> 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 AudioTranscriptionCreateParams.Body.Builderfile(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 AudioTranscriptionCreateParams.Body.Builderfile(Path 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 AudioTranscriptionCreateParams.Body.Buildermodel(AudioModel model)ID of the model to use. final AudioTranscriptionCreateParams.Body.Buildermodel(MultipartField<AudioModel> model)ID of the model to use. final AudioTranscriptionCreateParams.Body.Buildermodel(String value)ID of the model to use. final AudioTranscriptionCreateParams.Body.Builderlanguage(String language)The language of the input audio. final AudioTranscriptionCreateParams.Body.Builderlanguage(MultipartField<String> language)The language of the input audio. final AudioTranscriptionCreateParams.Body.Builderprompt(String prompt)An optional text to guide the model's style or continue a previous audio segment. final AudioTranscriptionCreateParams.Body.Builderprompt(MultipartField<String> prompt)An optional text to guide the model's style or continue a previous audio segment. final AudioTranscriptionCreateParams.Body.BuilderresponseFormat(AudioResponseFormat responseFormat)The format of the output, in one of these options: json,text,srt,verbose_json, orvtt.final AudioTranscriptionCreateParams.Body.BuilderresponseFormat(MultipartField<AudioResponseFormat> responseFormat)The format of the output, in one of these options: json,text,srt,verbose_json, orvtt.final AudioTranscriptionCreateParams.Body.Buildertemperature(Double temperature)The sampling temperature, between 0 and 1. final AudioTranscriptionCreateParams.Body.Buildertemperature(MultipartField<Double> temperature)The sampling temperature, between 0 and 1. final AudioTranscriptionCreateParams.Body.BuildertimestampGranularities(List<AudioTranscriptionCreateParams.TimestampGranularity> timestampGranularities)The timestamp granularities to populate for this transcription. final AudioTranscriptionCreateParams.Body.BuildertimestampGranularities(MultipartField<List<AudioTranscriptionCreateParams.TimestampGranularity>> timestampGranularities)The timestamp granularities to populate for this transcription. final AudioTranscriptionCreateParams.Body.BuilderaddTimestampGranularity(AudioTranscriptionCreateParams.TimestampGranularity timestampGranularity)The timestamp granularities to populate for this transcription. final AudioTranscriptionCreateParams.Bodybuild()-
-
Method Detail
-
file
final AudioTranscriptionCreateParams.Body.Builder file(InputStream 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.
-
file
final AudioTranscriptionCreateParams.Body.Builder file(MultipartField<InputStream> 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.
-
file
final AudioTranscriptionCreateParams.Body.Builder file(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.
-
file
final AudioTranscriptionCreateParams.Body.Builder file(Path 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 AudioTranscriptionCreateParams.Body.Builder model(AudioModel model)
ID of the model to use. Only
whisper-1(which is powered by our open source Whisper V2 model) is currently available.
-
model
final AudioTranscriptionCreateParams.Body.Builder model(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.
-
model
final AudioTranscriptionCreateParams.Body.Builder model(String value)
ID of the model to use. Only
whisper-1(which is powered by our open source Whisper V2 model) is currently available.
-
language
final AudioTranscriptionCreateParams.Body.Builder language(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.
-
language
final AudioTranscriptionCreateParams.Body.Builder language(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 AudioTranscriptionCreateParams.Body.Builder prompt(String prompt)
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
-
prompt
final AudioTranscriptionCreateParams.Body.Builder prompt(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 AudioTranscriptionCreateParams.Body.Builder responseFormat(AudioResponseFormat responseFormat)
The format of the output, in one of these options:
json,text,srt,verbose_json, orvtt.
-
responseFormat
final AudioTranscriptionCreateParams.Body.Builder responseFormat(MultipartField<AudioResponseFormat> responseFormat)
The format of the output, in one of these options:
json,text,srt,verbose_json, orvtt.
-
temperature
final AudioTranscriptionCreateParams.Body.Builder temperature(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.
-
temperature
final AudioTranscriptionCreateParams.Body.Builder temperature(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 AudioTranscriptionCreateParams.Body.Builder timestampGranularities(List<AudioTranscriptionCreateParams.TimestampGranularity> timestampGranularities)
The timestamp granularities to populate for this transcription.
response_formatmust be setverbose_jsonto 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.
-
timestampGranularities
final AudioTranscriptionCreateParams.Body.Builder timestampGranularities(MultipartField<List<AudioTranscriptionCreateParams.TimestampGranularity>> timestampGranularities)
The timestamp granularities to populate for this transcription.
response_formatmust be setverbose_jsonto 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.
-
addTimestampGranularity
final AudioTranscriptionCreateParams.Body.Builder addTimestampGranularity(AudioTranscriptionCreateParams.TimestampGranularity timestampGranularity)
The timestamp granularities to populate for this transcription.
response_formatmust be setverbose_jsonto 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.
-
build
final AudioTranscriptionCreateParams.Body build()
-
-
-
-