# Synchronous API (Request-Response)

### Introduction

This section describes the Synchronous HTTP API for Gowajee's speech-to-text (STT) service. With this API, clients send a request to the server and wait until the STT processing is complete to receive the result. This approach ensures that you receive the transcription data in a single, straightforward response.

> Note: At the moment, the Synchronous API supports only the [Pulse](/speech-to-text/models.md) model.

### Workflow

1. **Send Request**: The client sends an HTTP request to the Gowajee API endpoint, including the audio data to be transcribed.
2. **Processing**: The server processes the audio data using the specified STT model.
3. **Receive Response**: The server responds with the transcription result once the processing is complete.

***

## Request

* Method: `POST`
* Endpoint: `https://api.gowajee.ai/v1/speech-to-text/${MODEL}/transcribe`

### Supported Models

| Model  | Value  |
| ------ | ------ |
| Pulse  | pulse  |
| Cosmos | cosmos |

### Headers

<table><thead><tr><th width="141">Name</th><th width="96">Type</th><th width="121">Required</th><th>Description</th></tr></thead><tbody><tr><td>x-api-key</td><td>string</td><td>Yes</td><td>An API key to access the service</td></tr></tbody></table>

### Body Parameters

<table><thead><tr><th width="218">Name</th><th width="142">Type</th><th width="130">Required</th><th>Description</th></tr></thead><tbody><tr><td>audioData</td><td>string</td><td>Yes</td><td>Content of Audio data in base64 encoded string format or <code>multipart/form-data</code></td></tr><tr><td>getSpeakingRate</td><td>boolean</td><td>No</td><td>Get speaking rate (syllables per second)</td></tr><tr><td>getWordTimestamps</td><td>boolean</td><td>No</td><td>Get timestamps for all the words in the transcription.<br><br>Available only for the <a href="/pages/IUfJ0JS7YFdCq0GT98aw">Pulse</a> model.</td></tr><tr><td>boostWordList</td><td>string[]</td><td>No</td><td>Add specific words to increase the chance of these words appearing in results.<br><br>Available only for the <a href="/pages/IUfJ0JS7YFdCq0GT98aw">Pulse</a> and <a href="/pages/IUfJ0JS7YFdCq0GT98aw#mapping-model-with-api">Cosmos</a> models.<br><br>Read more <a href="/pages/NtrKnqwKRLjg1keTYkjE">details</a>.</td></tr><tr><td>boostScore</td><td>integer</td><td>No</td><td>The number between 1 to 20 to increase the chance of <code>boostWordList</code> appearing in results.<br><br>Available only for the <a href="/pages/IUfJ0JS7YFdCq0GT98aw">Pulse</a> and <a href="/pages/IUfJ0JS7YFdCq0GT98aw#mapping-model-with-api">Cosmos</a> models.<br><br>Read more <a href="/pages/NtrKnqwKRLjg1keTYkjE">details</a>.</td></tr><tr><td>multichannels</td><td>boolean</td><td>No</td><td>Set <code>multichannels=true</code> if your <code>audioData</code> is multichannel audio. This is useful for audio with multiple speakers with multiple channels.<br><br>Read more <a href="/pages/KuCIXAKK8i6jrLagwCmL">details</a>.</td></tr><tr><td>diarization</td><td>boolean</td><td>No</td><td>Set <code>diarization=true</code> if you want to perform speaker separation with diarization feature.<br><br>Read more <a href="/pages/zWpgr5uJC9jxFQOIvmdW">details</a>.</td></tr><tr><td>numSpeakers</td><td>integer</td><td>No</td><td>Number of speakers in your <code>audioData</code><br><br>Read more <a href="/pages/zWpgr5uJC9jxFQOIvmdW">details</a>.</td></tr><tr><td>minSpeakers</td><td>integer</td><td>No</td><td><p>Minimum number of speakers in your <code>audioData</code><br></p><p>Read more <a href="/pages/zWpgr5uJC9jxFQOIvmdW">details</a>.</p></td></tr><tr><td>maxSpeakers</td><td>integer</td><td>No</td><td>Maximum number of speakers in your <code>audioData</code><br><br>Read more <a href="/pages/zWpgr5uJC9jxFQOIvmdW">details</a>.</td></tr><tr><td>refSpeakers</td><td>RefSpeaker[]</td><td>No</td><td><p>The 4-5 seconds of speaker voice for diarization.<br></p><p>Users can upload multiple audio files, and the service will assume each file corresponds to a different speaker. If the service cannot determine which speaker corresponds to a particular transcription, it will label the speaker as 'unknown’.<br><br>Read more <a href="/pages/zWpgr5uJC9jxFQOIvmdW">details</a>.</p></td></tr><tr><td>sampleRate</td><td>integer</td><td>No<br>(Required for <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>)</td><td>The sample rate represents the number of samples of audio carried per second, measured in Hertz (Hz). It defines how many data points of audio are sampled in one second.<br><br>Read more about <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>.</td></tr><tr><td>sampleWidth</td><td>integer</td><td>No<br>(Required for <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>)</td><td>The sample width, also known as bit depth, determines the number of bits used to represent each audio sample. It directly affects the dynamic range of the audio signal (1 means 8-bit, 2 means 16-bit, etc).<br><br>Read more about <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>.</td></tr><tr><td>channels</td><td>integer</td><td>No<br>(Required for <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>)</td><td>Channels refer to the number of independent audio signals or paths in an audio file. Common values are mono (1 channel) and stereo (2 channels).<br><br>Read more about <a href="/pages/Hi3EYPRxiINBsyJDJPEJ">Raw Audio Format</a>.</td></tr></tbody></table>

## Response

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "type": "ASR_PULSE",
  "amount": 4.517,
  "output": {
    "results": [
      {
        "transcript": "วันนี้กินอะไรดี",
        "startTime": 0,
        "endTime": 4.517
      }
    ],
    "duration": 4.517,
    "version": "2.2.0"
  }
}
</code></pre>


---

# 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://developers.gowajee.ai/speech-to-text/transcription/synchronous-api-request-response.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.
