> ## Documentation Index
> Fetch the complete documentation index at: https://docs.identifai.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Classify a speech

> How to start a speech classification

You can classify a speech either from a **file** or a **URL**.
<br /> This section explains how to make a request using a file. For a URL, the process is similar, with the main difference being the [endpoint](../api-reference/classification/submit-speech-from-url) to call in *step 1*.

## Submission guidelines

Given the highly variable nature of audio, it is advisable to follow these simple guidelines:

* Send to the system audio containing only speech, as the analysis models are currently trained to recognize speech and not other types of audio (such as music or noise);
* For greater accuracy, it is suggested to send audio of an appropriate duration to the system, such as at least 10 seconds and not less than 3 seconds;
* The most accurate results are obtained by sending clean audio to the system, thus avoiding background noise (traffic noise or excessively loud noise, which could compromise the analysis).

## Submit a speech using API

To classify a speech, you need to make a **POST** request to `/api/classification_audio` with the required parameters (for details on the parameters, refer to the [API Reference](../api-reference/classification/submit-a-speech-for-classification) section).

```bash theme={null}
curl --request POST \
  --url https://backend.identifai.net/api/classification_audio \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Api-Key: <api-key>' \
  --form "audio=@/path/to/sample.mp3" 
```

In response you will receive the identifier of the classified speech.

<Tip>
  You can also [classify a speech from URL](../api-reference/classification/submit-speech-from-url)!
</Tip>

### Retrieve the results

Use the provided identifier to retrieve the classification results by making a **GET** request to `/api/classification/{identifier}` (for details on how to structure this request, see the [API Reference](../api-reference/classification/get-classification-result) section).

```bash theme={null}
curl --request GET \
  --url https://backend.identifai.net/api/classification_audio/{identifier} \
  --header 'X-Api-Key: <api-key>'
```

The response will contain the classification results for the speech in JSON format. In the response, you will find a results array, which includes the classification results for each model used, and a verdicts array, which contains the results for each heuristic applied.

<Note>
  The classification may not be finished yet! If the classification is not yet complete, continue sending the GET request until the result is available.
</Note>

## Guidelines on interpreting the results

As for interpreting the results, the advice is to focus on:

* Phantom as the primary result for the verdict (platform's default choice);
* Zebra II as the secondary result for the verdict;

### See also

<CardGroup>
  <Card title="Classify an image" icon="image" href="classify-image">
    Find out how to start an image classification and discover whether your image is authentic or artificially generated
  </Card>

  <Card title="Classify a video" icon="video" href="classify-video">
    Find out how to start a video classification and discover whether your video is authentic or artificially generated
  </Card>
</CardGroup>
