Configure Requests#
Transcription configuration options specify how transcription is performed. This includes the model used, features used, and additional parameters used for specific features.
The TranscriptionConfig
data structure encapsulates all available transcription
configuration fields. Various TranscriptionConfig
fields will be encountered
in further pages, but the complete list of fields is documented in the gRPC API reference:
TranscriptionConfig.
The example below shows how to set a TranscriptionConfig
field when using one
of the Soniox client libraries, in this case model
.
In the Soniox Python library, TranscriptionConfig
fields are specified
as keyword arguments to any of the available transcription functions.
result = transcribe_file_short(
"../test_data/test_audio.flac",
client,
model="en_v2",
)
In the Soniox Node library, TranscriptionConfig
fields are specified
by passing a config object to any of the available transcription functions.
const result = await speechClient.transcribeFileShort(
"../test_data/test_audio.flac",
{
model: "en_v2",
}
);
In the Soniox C# library, TranscriptionConfig
fields are specified
by passing a TranscriptionConfig
object to any of the available transcription
functions. Note that field names are adapted to the C# style.
var completeResult = await client.TranscribeFileShort(
"../../test_data/test_audio.flac",
new TranscriptionConfig {
Model = "en_v2",
});
Any parameter which is not set explicitly will an effective default value determined by its data type. This is: false for bool, 0 for numeric types, empty for string, and no elements for repeated (sequence) fields.