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

# Content Moderation

export const LanguageTable = ({languages, columns = 3}) => {
  return <div className="grid gap-2" style={{
    gridTemplateColumns: `repeat(${columns}, 1fr)`
  }}>
      {languages.map(language => <div key={language.code} className="flex justify-between items-center">
          <span>{language.name}</span>
          <code className="text-sm bg-gray-100 px-2 py-1 rounded">
            {language.code}
          </code>
        </div>)}
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported languages">
    <LanguageTable
      languages={[
  { name: "Global English", code: "en" },
  { name: "Australian English", code: "en_au" },
  { name: "British English", code: "en_uk" },
  { name: "US English", code: "en_us" },
  { name: "Spanish", code: "es" },
  { name: "French", code: "fr" },
  { name: "German", code: "de" },
  { name: "Italian", code: "it" },
  { name: "Portuguese", code: "pt" },
]}
      columns={2}
    />

    <br />
  </Accordion>

  <Accordion title="Supported models">
    <LanguageTable
      languages={[
  { name: "Universal-3 Pro", code: "universal-3-pro" },
  { name: "Universal-2", code: "universal-2" },
]}
      columns={2}
    />

    <br />
  </Accordion>

  <Accordion title="Supported regions">
    US & EU <br />
  </Accordion>
</AccordionGroup>

The Content Moderation model lets you detect inappropriate content in audio files to ensure that your content is safe for all audiences.

The model pinpoints sensitive discussions in spoken data and their severity.

## Quickstart

<Tabs groupId="language">
  <Tab language="python" title="Python" default>
    Enable Content Moderation by setting `content_safety` to `True` in the JSON payload.

    ```python {19} expandable theme={null}
    import requests
    import time

    base_url = "https://api.assemblyai.com"

    headers = {
        "authorization": "<YOUR_API_KEY>"
    }

    with open("./local_file.mp3", "rb") as f:
        response = requests.post(base_url + "/v2/upload",
                                headers=headers,
                                data=f)

    upload_url = response.json()["upload_url"]

    data = {
        "audio_url": upload_url, # You can also use a URL to an audio or video file on the web
        "speech_models": ["universal-3-pro", "universal-2"],
        "language_detection": True,
        "content_safety": True
    }

    url = base_url + "/v2/transcript"
    response = requests.post(url, json=data, headers=headers)

    transcript_id = response.json()['id']
    polling_endpoint = base_url + "/v2/transcript/" + transcript_id

    print(f"Transcript ID: {transcript_id}")

    while True:
        transcription_result = requests.get(polling_endpoint, headers=headers).json()

        if transcription_result['status'] == 'completed':

            for result in transcription_result['content_safety_labels']['results']:
                print(result['text'])
                print(f"Timestamp: {result['timestamp']['start']} - {result['timestamp']['end']}")

                # Get category, confidence, and severity.
                for label in result['labels']:
                    print(f"{label['label']} - {label['confidence']} - {label['severity']}")  # content safety category

            # Get the confidence of the most common labels in relation to the entire audio file.
            for label, confidence in transcription_result['content_safety_labels']['summary'].items():
                print(f"{confidence * 100}% confident that the audio contains {label}")

            # Get the overall severity of the most common labels in relation to the entire audio file.
            for label, severity_confidence in transcription_result['content_safety_labels']['severity_score_summary'].items():
                print(f"{severity_confidence['low'] * 100}% confident that the audio contains low-severity {label}")
                print(f"{severity_confidence['medium'] * 100}% confident that the audio contains medium-severity {label}")
                print(f"{severity_confidence['high'] * 100}% confident that the audio contains high-severity {label}")
            break
        elif transcription_result['status'] == 'error':
            raise RuntimeError(f"Transcription failed: {transcription_result['error']}")
        else:
            time.sleep(3)
    ```
  </Tab>

  <Tab language="python-sdk" title="Python SDK">
    Enable Content Moderation by setting `content_safety` to `True` in the transcription config.

    ```python {8} expandable theme={null}
    import assemblyai as aai

    aai.settings.api_key = "<YOUR_API_KEY>"

    # audio_file = "./local_file.mp3"
    audio_file = "https://assembly.ai/wildfires.mp3"

    config = aai.TranscriptionConfig(
        speech_models=["universal-3-pro", "universal-2"],
        language_detection=True,
        content_safety=True
    )

    transcript = aai.Transcriber().transcribe(audio_file, config)

    print(f"Transcript ID: {transcript.id}")

    for result in transcript.content_safety.results:
        print(result.text)
        print(f"Timestamp: {result.timestamp.start} - {result.timestamp.end}")

        # Get category, confidence, and severity.
        for label in result.labels:
            print(f"{label.label} - {label.confidence} - {label.severity}")  # content safety category

    # Get the confidence of the most common labels in relation to the entire audio file.
    for label, confidence in transcript.content_safety.summary.items():
        print(f"{confidence * 100}% confident that the audio contains {label}")

    # Get the overall severity of the most common labels in relation to the entire audio file.
    for label, severity_confidence in transcript.content_safety.severity_score_summary.items():
        print(f"{severity_confidence.low * 100}% confident that the audio contains low-severity {label}")
        print(f"{severity_confidence.medium * 100}% confident that the audio contains medium-severity {label}")
        print(f"{severity_confidence.high * 100}% confident that the audio contains high-severity {label}")
    ```
  </Tab>

  <Tab language="javascript" title="JavaScript">
    Enable Content Moderation by setting `content_safety` to `true` in the JSON payload.

    ```javascript {19} expandable theme={null}
    import fs from "fs-extra";

    const baseUrl = "https://api.assemblyai.com";

    const headers = {
      authorization: "<YOUR_API_KEY>",
    };

    const path = "./my-audio.mp3";
    const audioData = await fs.readFile(path);
    let res = await fetch(`${baseUrl}/v2/upload`, {
      method: "POST",
      headers,
      body: audioData,
    });
    if (!res.ok) throw new Error(`Error: ${res.status}`);
    const uploadResponse = await res.json();
    const uploadUrl = uploadResponse.upload_url;

    const data = {
      audio_url: uploadUrl, // You can also use a URL to an audio or video file on the web
      speech_models: ["universal-3-pro", "universal-2"],
      language_detection: true,
      content_safety: true,
    };

    const url = `${baseUrl}/v2/transcript`;
    res = await fetch(url, {
      method: "POST",
      headers: { ...headers, "Content-Type": "application/json" },
      body: JSON.stringify(data),
    });
    if (!res.ok) throw new Error(`Error: ${res.status}`);
    const response = await res.json();

    const transcriptId = response.id;
    console.log("Transcript ID: ", transcriptId);

    const pollingEndpoint = `${baseUrl}/v2/transcript/${transcriptId}`;

    while (true) {
      res = await fetch(pollingEndpoint, { headers });
      if (!res.ok) throw new Error(`Error: ${res.status}`);
      const transcriptionResult = await res.json();

      if (transcriptionResult.status === "completed") {
        const contentSafetyLabels = transcriptionResult.content_safety_labels;
        for (const result of contentSafetyLabels.results) {
          console.log(result.text);
          console.log(
            `Timestamp: ${result.timestamp.start} - ${result.timestamp.end}`
          );

          // Get category, confidence, and severity.
          for (const label of result.labels) {
            console.log(`${label.label} - ${label.confidence} - ${label.severity}`); // content safety category
          }
        }
        // Get the confidence of the most common labels in relation to the entire audio file
        for (const [label, confidence] of Object.entries(
          contentSafetyLabels.summary
        )) {
          console.log(
            `${confidence * 100}% confident that the audio contains ${label}`
          );
        }
        // Get the confidence of the most common labels in relation to the entire audio file.
        for (const [label, severity_confidence] of Object.entries(
          contentSafetyLabels.severity_score_summary
        )) {
          console.log(
            `${severity_confidence.low * 100}% confident that the audio contains low-severity ${label}`
          );
          console.log(
            `${severity_confidence.medium * 100}% confident that the audio contains medium-severity ${label}`
          );
          console.log(
            `${severity_confidence.high * 100}% confident that the audio contains high-severity ${label}`
          );
        }

        break;
      } else if (transcriptionResult.status === "error") {
        throw new Error(`Transcription failed: ${transcriptionResult.error}`);
      } else {
        await new Promise((resolve) => setTimeout(resolve, 3000));
      }
    }
    ```
  </Tab>

  <Tab language="javascript-sdk" title="JavaScript SDK">
    Enable Content Moderation by setting `content_safety` to `true` in the transcription config.

    ```javascript {12} expandable theme={null}
    import { AssemblyAI } from "assemblyai";

    const client = new AssemblyAI({
      apiKey: "<YOUR_API_KEY>",
    });

    // const audioFile = './local_file.mp3'
    const audioFile = "https://assembly.ai/wildfires.mp3";

    const params = {
      audio: audioFile,
      speech_models: ["universal-3-pro", "universal-2"],
      language_detection: true,
      content_safety: true,
    };

    const run = async () => {
      const transcript = await client.transcripts.transcribe(params);
      console.log(`Transcript ID: ${transcript.id}`);
      const contentSafetyLabels = transcript.content_safety_labels;

      // Get the parts of the transcript which were flagged as sensitive
      for (const result of contentSafetyLabels.results) {
        console.log(result.text);
        console.log(
          `Timestamp: ${result.timestamp.start} - ${result.timestamp.end}`
        );

        // Get category, confidence, and severity
        for (const label of result.labels) {
          console.log(`${label.label} - ${label.confidence} - ${label.severity}`);
        }
      }

      // Get the confidence of the most common labels in relation to the entire audio file
      for (const [label, confidence] of Object.entries(
        contentSafetyLabels.summary
      )) {
        console.log(
          `${confidence * 100}% confident that the audio contains ${label}`
        );
      }

      // Get the overall severity of the most common labels in relation to the entire audio file
      for (const [label, severity_confidence] of Object.entries(
        contentSafetyLabels.severity_score_summary
      )) {
        console.log(
          `${severity_confidence.low * 100}% confident that the audio contains low-severity ${label}`
        );
        console.log(
          `${severity_confidence.medium * 100}% confident that the audio contains medium-severity ${label}`
        );
        console.log(
          `${severity_confidence.high * 100}% confident that the audio contains high-severity ${label}`
        );
      }
    };
    run();
    ```
  </Tab>
</Tabs>

### Example output

```plain expandable theme={null}
Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines...
Timestamp: 250 - 28920
disasters - 0.8141 - 0.4014

So what is it about the conditions right now that have caused this round of wildfires to...
Timestamp: 29290 - 56190
disasters - 0.9217 - 0.5665

So what is it in this haze that makes it harmful? And I'm assuming it is...
Timestamp: 56340 - 88034
health_issues - 0.9358 - 0.8906

...

99.42% confident that the audio contains disasters
92.70% confident that the audio contains health_issues

57.43% confident that the audio contains low-severity disasters
42.56% confident that the audio contains mid-severity disasters
0.0% confident that the audio contains high-severity disasters
23.57% confident that the audio contains low-severity health_issues
30.22% confident that the audio contains mid-severity health_issues
46.19% confident that the audio contains high-severity health_issues
```

## Adjust the confidence threshold

The confidence threshold determines how likely something is to be flagged as inappropriate content. A threshold of 50% (which is the default) means any label with a confidence score of 50% or greater is flagged.

<Tabs groupId="language">
  <Tab language="python" title="Python" default>
    To adjust the confidence threshold for your transcription, include `content_safety_confidence` in the JSON payload.

    ```python {5} theme={null}
    # Setting the content safety confidence threshold to 60%.
    data = {
        "audio_url": upload_url,
        "content_safety": True,
        "content_safety_confidence": 60
    }
    ```
  </Tab>

  <Tab language="python-sdk" title="Python SDK">
    To adjust the confidence threshold for your transcription, include `content_safety_confidence` in the transcription config.

    ```python {4} theme={null}
    # Setting the content safety confidence threshold to 60%.
    config = aai.TranscriptionConfig(
      content_safety=True,
      content_safety_confidence=60
    )
    ```
  </Tab>

  <Tab language="javascript" title="JavaScript">
    To adjust the confidence threshold for your transcription, include `content_safety_confidence` in the JSON payload.

    ```javascript {5} theme={null}
    // Setting the content safety confidence threshold to 60%.
    const data = {
      audio_url: uploadUrl,
      content_safety: true,
      content_safety_confidence: 60,
    };
    ```
  </Tab>

  <Tab language="javascript-sdk" title="JavaScript SDK">
    To adjust the confidence threshold for your transcription, include `content_safety_confidence` in the transcription config.

    ```javascript {5} theme={null}
    // Setting the content safety confidence threshold to 60%.
    const params = {
      audio: audioFile,
      content_safety: true,
      content_safety_confidence: 60,
    };
    ```
  </Tab>
</Tabs>

## API reference

### Request

```bash {6-7} theme={null}
curl https://api.assemblyai.com/v2/transcript \
--header "Authorization: <YOUR_API_KEY>" \
--header "Content-Type: application/json" \
--data '{
  "audio_url": "YOUR_AUDIO_URL",
  "content_safety": true,
  "content_safety_confidence": 60
}'
```

| Key                         | Type    | Description                                                                         |
| --------------------------- | ------- | ----------------------------------------------------------------------------------- |
| `content_safety`            | boolean | Enable Content Moderation.                                                          |
| `content_safety_confidence` | integer | The confidence threshold for content moderation. Values must be between 25 and 100. |

### Response

```js expandable theme={null}
{
  content_safety_labels: {
    status: "success",
    results: [
      {
        text: "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
        labels: [
          {
            label: "disasters",
            confidence: 0.8142836093902588,
            severity: 0.4093044400215149,
          },
        ],
        sentences_idx_start: 0,
        sentences_idx_end: 5,
        timestamp: {
          start: 250,
          end: 28840,
        },
      },
      {
        text: "What is it about the conditions right now that have caused this round of wildfires to affect so many people so far away? Well, there's a couple of things. The season has been pretty dry already. And then the fact that we're getting hit in the US. Is because there's a couple of weather systems that are essentially channeling the smoke from those Canadian wildfires through Pennsylvania into the Mid Atlantic and the Northeast and kind of just dropping the smoke there.",
        labels: [
          {
            label: "disasters",
            confidence: 0.9228760004043579,
            severity: 0.5578508377075195,
          },
        ],
        sentences_idx_start: 6,
        sentences_idx_end: 10,
        timestamp: {
          start: 29610,
          end: 56142,
        },
      },
      {
        text: "So what is it in this haze that makes it harmful? And I'm assuming it is harmful. It is. The levels outside right now in Baltimore are considered unhealthy. And most of that is due to what's called particulate matter, which are tiny particles, microscopic smaller than the width of your hair that can get into your lungs and impact your respiratory system, your cardiovascular system, and even your neurological your brain. What makes this particularly harmful? Is it the volume of particulant?",
        labels: [
          {
            label: "health_issues",
            confidence: 0.9303749203681946,
            severity: 0.878470242023468,
          },
        ],
        sentences_idx_start: 11,
        sentences_idx_end: 17,
        timestamp: {
          start: 56276,
          end: 88034,
        },
      },
      {
        text: "And so the concentrations of these particles in the air are just much, much higher than we typically see. And exposure to those high levels can lead to a host of health problems. And who is most vulnerable? I noticed that in New York City, for example, they're canceling outdoor activities. And so here it is in the early days of summer, and they have to keep all the kids inside. So who tends to be vulnerable in a situation like this? It's the youngest.",
        labels: [
          {
            label: "health_issues",
            confidence: 0.8302478790283203,
            severity: 0.4810393154621124,
          },
        ],
        sentences_idx_start: 23,
        sentences_idx_end: 29,
        timestamp: {
          start: 113354,
          end: 138754,
        },
      },
      {
        text: "So children, obviously, whose bodies are still developing. The elderly, who are their bodies are more in decline and they're more susceptible to the health impacts of breathing, the poor air quality. And then people who have preexisting health conditions, people with respiratory conditions or heart conditions can be triggered by high levels of air pollution. Could this get worse? That's a good question. In some areas, it's much worse than others. And it just depends on kind of where the smoke is concentrated.",
        labels: [
          {
            label: "health_issues",
            confidence: 0.9725411534309387,
            severity: 0.6577644348144531,
          },
        ],
        sentences_idx_start: 30,
        sentences_idx_end: 36,
        timestamp: {
          start: 138802,
          end: 170370,
        },
      },
      {
        text: "I think New York has some of the higher concentrations right now, but that's going to change as that air moves away from the New York area. But over the course of the next few days, we will see different areas being hit at different times with the highest concentrations. I was going to ask you about more fires start burning. I don't expect the concentrations to go up too much higher.",
        labels: [
          {
            label: "disasters",
            confidence: 0.6661975979804993,
            severity: 0.12955275177955627,
          },
        ],
        sentences_idx_start: 37,
        sentences_idx_end: 40,
        timestamp: {
          start: 170950,
          end: 189030,
        },
      },
      {
        text: "I was going to ask you how and you started to answer this, but how much longer could this last? Or forgive me if I'm asking you to speculate, but what do you think? Well, I think the fires are going to burn for a little bit longer, but the key for us in the US. Is the weather system changing. And so right now, it's kind of the weather systems that are pulling that air into our mid Atlantic and Northeast region.",
        labels: [
          {
            label: "disasters",
            confidence: 0.6248577833175659,
            severity: 0.02552894689142704,
          },
        ],
        sentences_idx_start: 41,
        sentences_idx_end: 45,
        timestamp: {
          start: 189100,
          end: 211082,
        },
      },
      {
        text: "As those weather systems change and shift, we'll see that smoke going elsewhere and not impact us in this region as much. And so I think that's going to be the defining factor. And I think the next couple of days we're going to see a shift in that weather pattern and start to push the smoke away from where we are. And finally, with the impacts of climate change, we are seeing more wildfires.",
        labels: [
          {
            label: "disasters",
            confidence: 0.8657896518707275,
            severity: 0.005704181734472513,
          },
        ],
        sentences_idx_start: 46,
        sentences_idx_end: 49,
        timestamp: {
          start: 211146,
          end: 232354,
        },
      },
      {
        text: "Will we be seeing more of these kinds of wide ranging air quality consequences or circumstances? I mean, that is one of the predictions for climate change. Looking into the future, the fire season is starting earlier and lasting longer, and we're seeing more frequent fires. So, yeah, this is probably something that we'll be seeing more frequently. This tends to be much more of an issue in the Western US. So the eastern US. Getting hit right now is a little bit new.",
        labels: [
          {
            label: "disasters",
            confidence: 0.8090482354164124,
            severity: 0.005799858830869198,
          },
        ],
        sentences_idx_start: 50,
        sentences_idx_end: 56,
        timestamp: {
          start: 232482,
          end: 261760,
        },
      },
    ],
    summary: {
      disasters: 0.9940800441842205,
      health_issues: 0.9216489289040967,
    },
    severity_score_summary: {
      disasters: {
        low: 0.5733263024656846,
        medium: 0.42667369753431533,
        high: 0.0,
      },
      health_issues: {
        low: 0.22863814977924785,
        medium: 0.45014154926938227,
        high: 0.32122030095136983,
      },
    },
  },
}
```

| Key                                                                      | Type   | Description                                                                                                                 |
| ------------------------------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| `content_safety_labels`                                                  | object | An object containing all results of the Content Moderation model.                                                           |
| `content_safety_labels.status`                                           | string | Is either `success`, or `unavailable` in the rare case that the Content Moderation model failed.                            |
| `content_safety_labels.results`                                          | array  | An array of objects, one for each section in the audio file, that the Content Moderation file flagged.                      |
| `content_safety_labels.results[i].text`                                  | string | The transcript of the i-th section flagged by the Content Moderation model.                                                 |
| `content_safety_labels.results[i].labels`                                | array  | An array of objects, one per sensitive topic, that was detected in the i-th section.                                        |
| `content_safety_labels.results[i].labels[j].label`                       | string | The label of the sensitive topic.                                                                                           |
| `content_safety_labels.results[i].labels[j].confidence`                  | number | The confidence score for the j-th topic being discussed in the i-th section, from 0 to 1.                                   |
| `content_safety_labels.results[i].labels[j].severity`                    | number | How severely the j-th topic is discussed in the i-th section, from 0 to 1.                                                  |
| `content_safety_labels.results[i].sentences_idx_start`                   | number | The sentence index at which the i-th section begins.                                                                        |
| `content_safety_labels.results[i].sentences_idx_end`                     | number | The sentence index at which the i-th section ends.                                                                          |
| `content_safety_labels.results[i].timestamp`                             | object | Timestamp information for the i-th section.                                                                                 |
| `content_safety_labels.results[i].timestamp.start`                       | number | The time, in milliseconds, at which the i-th section begins.                                                                |
| `content_safety_labels.results[i].timestamp.end`                         | number | The time, in milliseconds, at which the i-th section ends.                                                                  |
| `content_safety_labels.summary`                                          | object | A summary of the Content Moderation confidence results for the entire audio file.                                           |
| `content_safety_labels.summary.topic`                                    | number | A confidence score for the presence of the sensitive topic "topic" across the entire audio file.                            |
| `content_safety_labels.severity_score_summary`                           | object | A summary of the Content Moderation severity results for the entire audio file.                                             |
| `content_safety_labels.severity_score_summary.topic.[low, medium, high]` | number | A distribution across the values "low", "medium", and "high" for the severity of the presence of "topic" in the audio file. |

The response also includes the request parameters used to generate the transcript.

## Supported labels

| Label                   | Description                                                                                                                                                                                                      | Model output              | Severity |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------- |
| Accidents               | Any man-made incident that happens unexpectedly and results in damage, injury, or death.                                                                                                                         | `accidents`               | Yes      |
| Alcohol                 | Content that discusses any alcoholic beverage or its consumption.                                                                                                                                                | `alcohol`                 | Yes      |
| Company Financials      | Content that discusses any sensitive company financial information.                                                                                                                                              | `financials`              | No       |
| Crime Violence          | Content that discusses any type of criminal activity or extreme violence that is criminal in nature.                                                                                                             | `crime_violence`          | Yes      |
| Drugs                   | Content that discusses illegal drugs or their usage.                                                                                                                                                             | `drugs`                   | Yes      |
| Gambling                | Includes gambling on casino-based games such as poker, slots, etc. as well as sports betting.                                                                                                                    | `gambling`                | Yes      |
| Hate Speech             | Content that's a direct attack against people or groups based on their sexual orientation, gender identity, race, religion, ethnicity, national origin, disability, etc.                                         | `hate_speech`             | Yes      |
| Health Issues           | Content that discusses any medical or health-related problems.                                                                                                                                                   | `health_issues`           | Yes      |
| Manga                   | Mangas are comics or graphic novels originating from Japan with some of the more popular series being "Pokemon", "Naruto", "Dragon Ball Z", "One Punch Man", and "Sailor Moon".                                  | `manga`                   | No       |
| Marijuana               | This category includes content that discusses marijuana or its usage.                                                                                                                                            | `marijuana`               | Yes      |
| Natural Disasters       | Phenomena that happens infrequently and results in damage, injury, or death. Such as hurricanes, tornadoes, earthquakes, volcano eruptions, and firestorms.                                                      | `disasters`               | Yes      |
| Negative News           | News content with a negative sentiment which typically occur in the third person as an unbiased recapping of events.                                                                                             | `negative_news`           | No       |
| NSFW (Adult Content)    | Content considered "Not Safe for Work" and consists of content that a viewer would not want to be heard/seen in a public environment.                                                                            | `nsfw`                    | No       |
| Pornography             | Content that discusses any sexual content or material.                                                                                                                                                           | `pornography`             | Yes      |
| Profanity               | Any profanity or cursing.                                                                                                                                                                                        | `profanity`               | Yes      |
| Sensitive Social Issues | This category includes content that may be considered insensitive, irresponsible, or harmful to certain groups based on their beliefs, political affiliation, sexual orientation, or gender identity.            | `sensitive_social_issues` | No       |
| Terrorism               | Includes terrorist acts as well as terrorist groups. Examples include bombings, mass shootings, and ISIS. Note that many texts corresponding to this topic may also be classified into the crime violence topic. | `terrorism`               | Yes      |
| Tobacco                 | Text that discusses tobacco and tobacco usage, including e-cigarettes, nicotine, vaping, and general discussions about smoking.                                                                                  | `tobacco`                 | Yes      |
| Weapons                 | Text that discusses any type of weapon including guns, ammunition, shooting, knives, missiles, torpedoes, etc.                                                                                                   | `weapons`                 | Yes      |

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why is the Content Moderation model not detecting sensitive content in my audio file?" theme="dark" iconColor="white">
    There could be a few reasons for this. First, make sure that the audio file contains speech, and not just background noise or music. Additionally, the model may not have been trained on the specific type of sensitive content you're looking for. If you believe the model should be able to detect the content but it's not, you can reach out to AssemblyAI's support team for assistance.
  </Accordion>

  <Accordion title="Why is the Content Moderation model flagging content that isn't actually sensitive?" theme="dark" iconColor="white">
    The model may occasionally flag content as sensitive that isn't actually problematic. This can happen if the model isn't trained on the specific context or nuances of the language being used. In these cases, you can manually review the flagged content and determine if it's actually sensitive or not. If you believe the model is consistently flagging content incorrectly, you can contact AssemblyAI's support team to report the issue.
  </Accordion>

  <Accordion title="How do I know which specific parts of the audio file contain sensitive content?" theme="dark" iconColor="white">
    The Content Moderation model provides segment-level results that pinpoint where in the audio the sensitive content was discussed, as well as the degree to which it was discussed. You can access this information in the results key of the API response. Each result in the list contains a text key that shows the sensitive content, and a labels key that shows the detected sensitive topics along with their confidence and severity scores.
  </Accordion>

  <Accordion title="Can the Content Moderation model be used in real-time applications?" theme="dark" iconColor="white">
    The model is designed to process batches of segments in significantly less than 1 second, making it suitable for real-time applications. However, keep in mind that the actual processing time depends on the length of the audio file and the number of segments it's divided into. Additionally, the model may occasionally require additional time to process particularly complex or long segments.
  </Accordion>

  <Accordion title="Why am I receiving an error message when using the Content Moderation model?" theme="dark" iconColor="white">
    If you receive an error message, it may be due to an issue with your request format or parameters. Double-check that your request includes the correct `audio_url` parameter. If you continue to experience issues, you can reach out to AssemblyAI's support team for assistance.
  </Accordion>
</AccordionGroup>
