Create transcription
Creates a text transcription for the selected audio file
Function CreateTranscription(Val URL, Val Token, Val Model, Val Audio, Val MIME = "audio/mpeg", Val AdditionalParameters = "", Val AdditionalHeaders = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | OpenAI server URL |
Token | --token | String | ✔ | OpenAI authorization token |
Model | --model | String | ✔ | Models name |
Audio | --audio | String, BinaryData | ✔ | Audio file |
MIME | --type | String | ✖ | MIME type of audio file |
AdditionalParameters | --options | Structure Of KeyAndValue | ✖ | Additional request parameters, if necessary |
AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
tip
Method at API documentation: Create transcription
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
URL = "https://api.athenaeum.digital:1122/";
Token = "sk-or-vv-c5884ebe9f13fb143194bb07ecb...";
Audio = "C:\Users\Administrator\AppData\Local\Temp\v8_7146_1e.wav";
Model = "whisper-1";
Result = OPI_OpenAI.CreateTranscription(URL, Token, Model, Audio, "audio/wav");
- Bash
- CMD/Bat
oint openai CreateTranscription \
--url "https://api.athenaeum.digital:1122/" \
--token "***" \
--model "whisper-1" \
--audio "C:\Users\Administrator\AppData\Local\Temp\bi04ndbxhxg.wav" \
--type "audio/wav"
oint openai CreateTranscription ^
--url "https://api.athenaeum.digital:1122/" ^
--token "***" ^
--model "whisper-1" ^
--audio "C:\Users\Administrator\AppData\Local\Temp\bi04ndbxhxg.wav" ^
--type "audio/wav"
Result
{
"segments": [
{
"id": 0,
"start": 0,
"end": 4400000000,
"text": "attack ships on fire off the shoulder of Orion Bright as magnesium.",
"tokens": [
50364,
2690,
11434,
322,
2610,
766,
264,
7948,
295,
41028,
24271,
382,
32950,
13,
50584
]
}
],
"text": "attack ships on fire off the shoulder of Orion Bright as magnesium."
}