> ## 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.

# Topic Detection

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 Topic Detection model lets you identify different topics in the transcript. The model uses the [IAB Content Taxonomy](https://airtable.com/shr7KNXOtvfhTTS4i/tblqVLDb7YSsCMXo4?backgroundColor=purple\&viewControls=on), a standardized language for content description which consists of 698 comprehensive topics.

## Quickstart

<Tabs groupId="language">
  <Tab language="python" title="Python" default>
    Enable Topic Detection by setting `iab_categories` 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,
        "iab_categories": 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':
          # Get the parts of the transcript that were tagged with topics
          for result in transcription_result['iab_categories_result']['results']:
            print(result['text'])
            print(f"Timestamp: {result['timestamp']['start']} - {result['timestamp']['end']}")

            for label in result['labels']:
              print(f"{label['label']} ({label['relevance']})")

          # Get a summary of all topics in the transcript
          for topic, relevance in transcription_result['iab_categories_result']['summary'].items():
            print(f"Audio is {relevance * 100}% relevant to {topic}")
          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 Topic Detection by setting `iab_categories` to `True` in the transcription parameters.

    ```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,
        iab_categories=True
    )

    transcript = aai.Transcriber().transcribe(audio_file, config)
    print(f"Transcript ID: {transcript.id}")

    # Get the parts of the transcript that were tagged with topics
    for result in transcript.iab_categories.results:
        print(result.text)
        print(f"Timestamp: {result.timestamp.start} - {result.timestamp.end}")
        for label in result.labels:
            print(f"{label.label} ({label.relevance})")

    # Get a summary of all topics in the transcript
    for topic, relevance in transcript.iab_categories.summary.items():
        print(f"Audio is {relevance * 100}% relevant to {topic}")
    ```
  </Tab>

  <Tab language="javascript" title="JavaScript">
    Enable Topic Detection by setting `iab_categories` 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,
      iab_categories: 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") {
        // Get the parts of the transcript that were tagged with topics
        for (const result of transcriptionResult.iab_categories_result.results) {
          console.log(result.text);
          console.log(
            `Timestamp: ${result.timestamp.start} - ${result.timestamp.end}`
          );

          for (const label of result.labels) {
            console.log(`${label.label} (${label.relevance})`);
          }
        }
        // Get a summary of all topics in the transcript
        for (const [topic, relevance] of Object.entries(
          transcriptionResult.iab_categories_result.summary
        )) {
          console.log(`Audio is ${relevance * 100} relevant to ${topic}`);
        }
        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 Topic Detection by setting `iab_categories` 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,
      iab_categories: true,
    };

    const run = async () => {
      const transcript = await client.transcripts.transcribe(params);
      console.log("Transcript ID: ", transcript.id);

      // Get the parts of the transcript that were tagged with topics
      for (const result of transcript.iab_categories_result.results) {
        console.log(result.text);
        console.log(
          `Timestamp: ${result.timestamp?.start} - ${result.timestamp?.end}`
        );
        for (const label of result.labels) {
          console.log(`${label.label} (${label.relevance})`);
        }
      }

      // Get a summary of all topics in the transcript
      for (const [topic, relevance] of Object.entries(
        transcript.iab_categories_result.summary
      )) {
        console.log(`Audio is ${relevance * 100} relevant to ${topic}`);
      }
    };

    run();
    ```
  </Tab>
</Tabs>

### Example output

```plain theme={null}
Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines...
Timestamp: 250 - 28920
Home&Garden>IndoorEnvironmentalQuality (0.9881)
NewsAndPolitics>Weather (0.5561)
MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth (0.0042)
...
Audio is 100.0% relevant to NewsAndPolitics>Weather
Audio is 93.78% relevant to Home&Garden>IndoorEnvironmentalQuality
...
```

<Tip>
  **Topic Detection Using LLM Gateway**

  Check out this cookbook [Custom Topic Tags](/guides/custom-topic-tags)
  for an example of how to use LLM Gateway to create custom topic tags.
</Tip>

## API reference

### Request

```bash {6} 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",
  "iab_categories": true
}'
```

| Key              | Type    | Description             |
| ---------------- | ------- | ----------------------- |
| `iab_categories` | boolean | Enable Topic Detection. |

### Response

```js expandable theme={null}
{
  iab_categories_result: {
    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: [
          {
            relevance: 0.988274097442627,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.5821335911750793,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.0042327106930315495,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.0033971222583204508,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.002469958271831274,
            label: "BusinessAndFinance>Business>GreenSolutions",
          },
          {
            relevance: 0.0014376690378412604,
            label: "MedicalHealth>DiseasesAndConditions>Cancer",
          },
          {
            relevance: 0.0014294233405962586,
            label: "Science>Environment",
          },
          {
            relevance: 0.001234519761055708,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0010231725173071027,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0007445293595083058,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
        ],
        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: [
          {
            relevance: 0.9667055010795593,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.19349651038646698,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.007998290471732616,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0007007605163380504,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.0006503399927169085,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0005085167940706015,
            label: "Science>Environment",
          },
          {
            relevance: 0.0003594171430449933,
            label: "Sports>OlympicSports>WinterOlympicSports",
          },
          {
            relevance: 0.00031780285644344985,
            label: "PopCulture>CelebrityScandal",
          },
          {
            relevance: 0.00028784608002752066,
            label: "Sports>CollegeSports>CollegeBaseball",
          },
          {
            relevance: 0.0002203711192123592,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
        ],
        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: [
          {
            relevance: 0.9955303072929382,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.028595492243766785,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.003357736626639962,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.0007577401702292264,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0007211097399704158,
            label: "MedicalHealth>DiseasesAndConditions>Allergies",
          },
          {
            relevance: 0.0006683538085781038,
            label: "MedicalHealth>DiseasesAndConditions>Injuries",
          },
          {
            relevance: 0.0005227243527770042,
            label: "HealthyLiving",
          },
          {
            relevance: 0.00036367119173519313,
            label: "Technology&Computing>Computing>ComputerNetworking",
          },
          {
            relevance: 0.0003151895070914179,
            label: "HealthyLiving>Wellness>SmokingCessation",
          },
          {
            relevance: 0.0002955370000563562,
            label: "RealEstate>OfficeProperty",
          },
        ],
        timestamp: {
          start: 56276,
          end: 88034,
        },
      },
      {
        text: "Is it something in particular? What is it exactly? Can you just drill down on that a little bit more? Yeah. So the concentration of particulate matter I was looking at some of the monitors that we have was reaching levels of what are, in science, big 150 micrograms per meter cubed, which is more than ten times what the annual average should be and about four times higher than what you're supposed to have on a 24 hours average.",
        labels: [
          {
            relevance: 0.9881851673126221,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.0010195717914029956,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.0005706266965717077,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0003804410225711763,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.0003401130379643291,
            label:
              "MedicalHealth>DiseasesAndConditions>HeartAndCardiovascularDiseases",
          },
          {
            relevance: 0.0003019376308657229,
            label: "MedicalHealth>DiseasesAndConditions>Allergies",
          },
          {
            relevance: 0.000281211658148095,
            label: "HealthyLiving",
          },
          {
            relevance: 0.00027685757959261537,
            label: "Home&Garden>Remodeling&Construction",
          },
          {
            relevance: 0.0002556040126364678,
            label: "BusinessAndFinance>Business>ConsumerIssues>Recalls",
          },
          {
            relevance: 0.00019348932255525142,
            label: "RealEstate>OfficeProperty",
          },
        ],
        timestamp: {
          start: 88082,
          end: 113258,
        },
      },
      {
        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: [
          {
            relevance: 0.9975869655609131,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.10198913514614105,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.025256866589188576,
            label: "HealthyLiving",
          },
          {
            relevance: 0.004600986372679472,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.004249158315360546,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.002624025335535407,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0014258016599342227,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.0014156353427097201,
            label: "MedicalHealth>DiseasesAndConditions>MentalHealth",
          },
          {
            relevance: 0.0011561078717932105,
            label: "MedicalHealth>DiseasesAndConditions>Allergies",
          },
          {
            relevance: 0.0010420052567496896,
            label: "MedicalHealth>DiseasesAndConditions>Injuries",
          },
        ],
        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: [
          {
            relevance: 0.9996503591537476,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.6170681118965149,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.02062302641570568,
            label: "HealthyLiving",
          },
          {
            relevance: 0.010274156928062439,
            label:
              "MedicalHealth>DiseasesAndConditions>HeartAndCardiovascularDiseases",
          },
          {
            relevance: 0.007371500600129366,
            label: "HealthyLiving>Wellness>SmokingCessation",
          },
          {
            relevance: 0.005629349499940872,
            label: "MedicalHealth>DiseasesAndConditions>Injuries",
          },
          {
            relevance: 0.0033619196619838476,
            label: "MedicalHealth>DiseasesAndConditions>Allergies",
          },
          {
            relevance: 0.0032199521083384752,
            label: "MedicalHealth>DiseasesAndConditions>Cancer",
          },
          {
            relevance: 0.002642817562445998,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0024871069472283125,
            label: "NewsAndPolitics>Weather",
          },
        ],
        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: [
          {
            relevance: 0.9051397442817688,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.05779021233320236,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.012258341535925865,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.001360786729492247,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0003114799619652331,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.00030524705653078854,
            label: "Automotive>AutoParts",
          },
          {
            relevance: 0.0002636107965372503,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.00025970168644562364,
            label: "MedicalHealth>DiseasesAndConditions>Cancer",
          },
          {
            relevance: 0.00023528788005933166,
            label: "Automotive>AutoType>PerformanceCars",
          },
          {
            relevance: 0.00022414950944948941,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
        ],
        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: [
          {
            relevance: 0.9955629110336304,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.008395846001803875,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0024605081416666508,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.0005194907425902784,
            label: "Science>Environment",
          },
          {
            relevance: 0.00028931227279827,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0002018982922891155,
            label: "Sports>CollegeSports>CollegeBaseball",
          },
          {
            relevance: 0.00017360984929837286,
            label: "PopCulture>CelebrityScandal",
          },
          {
            relevance: 0.0001712092343950644,
            label: "Sports>OlympicSports>SummerOlympicSports",
          },
          {
            relevance: 0.00015698879724368453,
            label: "MusicAndAudio>AdultContemporaryMusic>UrbanACMusic",
          },
          {
            relevance: 0.0001443001820007339,
            label: "BusinessAndFinance>Economy>FinancialCrisis",
          },
        ],
        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: [
          {
            relevance: 0.9943384528160095,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.00387981696985662,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0031615248881280422,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.0019596796482801437,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.001271517714485526,
            label: "Science>Environment",
          },
          {
            relevance: 0.00032604511943645775,
            label: "PopCulture>CelebrityScandal",
          },
          {
            relevance: 0.00028069576364941895,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
          {
            relevance: 0.00025750460918061435,
            label: "Technology&Computing>Computing",
          },
          {
            relevance: 0.0001956245250767097,
            label: "Sports>AutoRacing>MotorcycleSports",
          },
          {
            relevance: 0.00019082955259364098,
            label: "Sports>OlympicSports>SummerOlympicSports",
          },
        ],
        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: [
          {
            relevance: 0.9948033690452576,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.12892243266105652,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.04659998416900635,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.023162951692938805,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.0044741383753716946,
            label: "Science>Environment",
          },
          {
            relevance: 0.0010589624289423227,
            label: "MedicalHealth>DiseasesAndConditions>ColdAndFlu",
          },
          {
            relevance: 0.0009752486366778612,
            label:
              "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth",
          },
          {
            relevance: 0.0008771885768510401,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
          {
            relevance: 0.0005613958346657455,
            label: "Food&Drink>Cooking",
          },
          {
            relevance: 0.0005496227531693876,
            label: "MedicalHealth>DiseasesAndConditions>Cancer",
          },
        ],
        timestamp: {
          start: 232482,
          end: 261760,
        },
      },
      {
        text: "But yeah, I think with climate change moving forward, this is something that is going to happen more frequently. That's Peter De Carlo, associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University. Sergeant Carlo, thanks so much for joining us and sharing this expertise with us. Thank you for having me.",
        labels: [
          {
            relevance: 0.9194307923316956,
            label: "Science>Environment",
          },
          {
            relevance: 0.8289446234703064,
            label:
              "BusinessAndFinance>Industries>EnvironmentalServicesIndustry",
          },
          {
            relevance: 0.361684650182724,
            label: "BusinessAndFinance>Business>GreenSolutions",
          },
          {
            relevance: 0.21688857674598694,
            label: "NewsAndPolitics>Weather",
          },
          {
            relevance: 0.05395161733031273,
            label: "Home&Garden>IndoorEnvironmentalQuality",
          },
          {
            relevance: 0.05076828971505165,
            label: "NewsAndPolitics>Disasters",
          },
          {
            relevance: 0.004510390106588602,
            label: "BusinessAndFinance>Industries>PowerAndEnergyIndustry",
          },
          {
            relevance: 0.003953366074711084,
            label: "Travel>TravelLocations>PolarTravel",
          },
          {
            relevance: 0.0007138398941606283,
            label: "EventsAndAttractions>Parks&Nature",
          },
          {
            relevance: 0.0006015477702021599,
            label: "Travel>TravelType>BeachTravel",
          },
        ],
        timestamp: {
          start: 262130,
          end: 280340,
        },
      },
    ],
    summary: {
      "NewsAndPolitics>Weather": 1.0,
      "Home&Garden>IndoorEnvironmentalQuality": 0.9043831825256348,
      "Science>Environment": 0.16117265820503235,
      "BusinessAndFinance>Industries>EnvironmentalServicesIndustry": 0.14393523335456848,
      "MedicalHealth>DiseasesAndConditions>LungAndRespiratoryHealth": 0.11401086300611496,
      "BusinessAndFinance>Business>GreenSolutions": 0.06348437070846558,
      "NewsAndPolitics>Disasters": 0.05041387677192688,
      "Travel>TravelLocations>PolarTravel": 0.01308488193899393,
      HealthyLiving: 0.008222488686442375,
      "MedicalHealth>DiseasesAndConditions>ColdAndFlu": 0.0022315620444715023,
      "MedicalHealth>DiseasesAndConditions>HeartAndCardiovascularDiseases": 0.00213034451007843,
      "HealthyLiving>Wellness>SmokingCessation": 0.001540527562610805,
      "MedicalHealth>DiseasesAndConditions>Injuries": 0.0013950627762824297,
      "BusinessAndFinance>Industries>PowerAndEnergyIndustry": 0.0012570273829624057,
      "MedicalHealth>DiseasesAndConditions>Cancer": 0.001097781932912767,
      "MedicalHealth>DiseasesAndConditions>Allergies": 0.0010148967849090695,
      "MedicalHealth>DiseasesAndConditions>MentalHealth": 0.000717321818228811,
      "Style&Fashion>PersonalCare>DeodorantAndAntiperspirant": 0.0006022014422342181,
      "Technology&Computing>Computing>ComputerNetworking": 0.0005461975233629346,
      "MedicalHealth>DiseasesAndConditions>Injuries>FirstAid": 0.0004885646631009877,
    },
  },
}
```

| Key                                                    | Type   | Description                                                                                                                                |
| ------------------------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `iab_categories_result`                                | object | The result of the Topic Detection model.                                                                                                   |
| `iab_categories_result.status`                         | string | Is either `success`, or `unavailable` in the rare case that the Topic Detection model failed.                                              |
| `iab_categories_result.results`                        | array  | An array of the Topic Detection results.                                                                                                   |
| `iab_categories_result.results[i].text`                | string | The text in the transcript in which the i-th instance of a detected topic occurs.                                                          |
| `iab_categories_result.results[i].labels[j].relevance` | number | How relevant the j-th detected topic is in the i-th instance of a detected topic.                                                          |
| `iab_categories_result.results[i].labels[j].label`     | string | The IAB taxonomical label for the j-th label of the i-th instance of a detected topic, where `>` denotes supertopic/subtopic relationship. |
| `iab_categories_result.results[i].timestamp.start`     | number | The starting time in the audio file at which the i-th detected topic instance is discussed.                                                |
| `iab_categories_result.results[i].timestamp.end`       | number | The ending time in the audio file at which the i-th detected topic instance is discussed.                                                  |
| `iab_categories_result.summary`                        | object | Summary where each property is a detected topic.                                                                                           |
| `iab_categories_result.summary.topic`                  | number | The overall relevance of <i>topic</i> to the entire audio file.                                                                            |

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

## Frequently asked questions

{" "}

<Accordion title="How does the Topic Detection model handle misspelled or unrecognized words?" theme="dark" iconColor="white">
  <p>
    The Topic Detection model uses natural language processing and machine
    learning to identify related words and phrases even if they are misspelled
    or unrecognized. However, the accuracy of the detection may depend on the
    severity of the misspelling or the obscurity of the word.
  </p>
</Accordion>

<Accordion title="Can I use the Topic Detection model to identify entities that aren't part of the IAB Taxonomy?" theme="dark" iconColor="white">
  <p>
    No, the Topic Detection model can only identify entities that are part of
    the IAB Taxonomy. The model is optimized for contextual targeting use cases,
    so using the predefined IAB categories ensures the most accurate results.
  </p>
</Accordion>

<Accordion title="Why am I not getting any topic predictions for my audio file?" theme="dark" iconColor="white">
  <p>
    There could be several reasons why you aren't getting any topic predictions
    for your audio file. One possible reason is that the audio file doesn't
    contain enough relevant content for the model to analyze. Additionally, the
    accuracy of the predictions may be affected by factors such as background
    noise, low-quality audio, or a low confidence threshold for topic detection.
    It's recommended to review and adjust the model's configuration parameters
    and to provide high-quality, relevant audio files for analysis.
  </p>
</Accordion>

<Accordion title="Why am I getting inaccurate or irrelevant topic predictions for my audio file?" theme="dark" iconColor="white">
  <p>
    There could be several reasons why you're getting inaccurate or irrelevant
    topic predictions for your audio file. One possible reason is that the audio
    file contains background noise or other non-relevant content that's
    interfering with the model's analysis. Additionally, the accuracy of the
    predictions may be affected by factors such as low-quality audio, a low
    confidence threshold for topic detection, or insufficient training data.
    It's recommended to review and adjust the model's configuration parameters,
    to provide high-quality, relevant audio files for analysis, and to consider
    adding additional training data to the model.
  </p>
</Accordion>

<Accordion title="Is AssemblyAI associated with IAB?" theme="dark" iconColor="white">
  <p>
    As of 2023, AssemblyAI is a partner with the Interactive Advertising Bureau
    (IAB), a certification and community for advertising across the internet.
    AssemblyAI built Topic Detection using the IAB Taxonomy, which is a
    blueprint of the approximately 700 topics used to categorize ads.
  </p>
</Accordion>
