# OPENAITRANSCRIPTION

## Overview

The **OPENAITRANSCRIPTION** workflow application lets you interact with an OpenAI audio model to transcribe an audio file.

## How it works

* The application sends the audio file to OpenAI to transcribe its content.
* Application logs are available. These can be specified by setting the value of the `OpenAITranscriptionLogLevel` parameter in the `web.config` file to `0` to deactivate logs, `1` for error logs, `2` for information logs, or `3` for debug logs; the default value is `0`.

## Required parameter

<table data-full-width="false"><thead><tr><th width="237.74932861328125" valign="top">Parameter</th><th width="109.92596435546875" valign="top">Type</th><th width="110.17095947265625" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>FILE</code></td><td valign="top">FILE</td><td valign="top">IN</td><td valign="top">The audio file to transcribe</td></tr></tbody></table>

## Optional parameters

<table data-full-width="false"><thead><tr><th width="237.63818359375" valign="top">Parameters</th><th width="110.2877197265625" valign="top">Type</th><th width="109.697998046875" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>API_KEY</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">OpenAI API key<br><br>By default, this value comes from the <code>OpenAiApiKey</code> parameter in the <code>web.config</code> file.</td></tr><tr><td valign="top"><code>URL</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">API endpoint; defaults to <code>https://api.openai.com/v1/audio/transcriptions</code></td></tr><tr><td valign="top"><code>MODEL</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">ID of the model to use; defaults to <code>whisper-1</code></td></tr><tr><td valign="top"><code>TEMPERATURE</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top"><p>Sampling temperature, between <code>0</code> and <code>1</code>; defaults to <code>1</code></p><p></p><p>Higher values (e.g. <code>0.8</code>) will make the output more random, while lower values (e.g. <code>0.2</code>) will make it more focused and deterministic.</p></td></tr><tr><td valign="top"><code>LANGUAGE</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><p>The language of the input audio</p><p></p><p>Supplying the input language in ISO-639-1 format will improve accuracy and latency.</p></td></tr><tr><td valign="top"><code>PROMPT</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Optional text to guide the model's style or continue a previous audio segment; the prompt should match the audio language</td></tr><tr><td valign="top"><code>VERBOSE_OUTPUT</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Specifies (<code>Y</code> or <code>N</code>) if the output should be verbose; defaults to <code>N</code></td></tr><tr><td valign="top"><code>WORDS_OUTPUT</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Specifies (<code>Y</code> or <code>N</code>) if the verbose output should include detailed words; defaults to <code>N</code></td></tr><tr><td valign="top"><code>RESULT_WORDS_SEPARATOR</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Separator used to separate the word list; defaults to <code>,</code> (comma)</td></tr><tr><td valign="top"><code>APP_RESPONSE_IGNORE_ERROR</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><p>Specifies (<code>Y</code> or <code>N</code>) if errors should be ignored; defaults to <code>N</code></p><p><br>In case of error, if the parameter has <code>Y</code> as its value, the error will be ignored and defined OUT parameters (<code>APP_RESPONSE_STATUS</code> or <code>APP_RESPONSE_CONTENT</code>) will be mapped. Otherwise, an exception will be thrown.</p></td></tr><tr><td valign="top"><code>TEXT</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">The transcription text</td></tr><tr><td valign="top"><code>RESULT</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">The transcription result call</td></tr><tr><td valign="top"><code>RESULT_DURATION</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Audio duration (only if verbose)</td></tr><tr><td valign="top"><code>RESULT_WORDS</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Transcription words separated by <code>RESULT_WORDS_SEPARATOR</code> (only if word output and verbose enabled)</td></tr><tr><td valign="top"><code>RESULT_WORDS_COUNT</code></td><td valign="top">NUMERIC</td><td valign="top">OUT</td><td valign="top">Transcription word count (only if word output and verbose enabled)</td></tr><tr><td valign="top"><code>RESULT_LANGUAGE</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Transcription language (only if verbose)</td></tr><tr><td valign="top"><code>APP_RESPONSE_STATUS</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Response status code</td></tr><tr><td valign="top"><code>APP_RESPONSE_CONTENT</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Response payload or error message</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.workflowgen.com/admin/10.0/workflow-applications/openai/openaitranscription.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
