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

# Audio Classification

> QIM SDK supported models for Audio Classification

***

<Tabs>
  <Tab title="TFLite Runtime">
    <div style={{overflowX:"auto",borderRadius:"10px",boxShadow:"0 2px 12px rgba(50,83,220,0.10)",overflow:"hidden"}}>
      <table style={{width:"100%",borderCollapse:"collapse",fontSize:"0.85rem",border:"2px solid #3253DC"}}>
        <colgroup>
          <col style={{width:"40px"}} />

          <col style={{width:"220px"}} />

          <col style={{width:"100%"}} />
        </colgroup>

        <thead>
          <tr>
            <th style={{backgroundColor:"#3253DC",color:"#ffffff",border:"1px solid #000000",padding:"10px 8px",textAlign:"center",letterSpacing:"0.05em",width:"40px"}}>No.</th>
            <th style={{backgroundColor:"#3253DC",color:"#ffffff",border:"1px solid #000000",padding:"10px 8px",textAlign:"center",letterSpacing:"0.05em",width:"220px"}}>Model Name</th>
            <th style={{backgroundColor:"#3253DC",color:"#ffffff",border:"1px solid #000000",padding:"10px 8px",textAlign:"center",letterSpacing:"0.05em"}}>Description</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td rowSpan={2} style={{border:"1px solid #e2e8f0",padding:"8px",textAlign:"center",verticalAlign:"middle",width:"40px"}}>1</td>
            <td style={{border:"1px solid #e2e8f0",padding:"8px",textAlign:"left",verticalAlign:"middle",width:"180px"}}><a href="https://aihub.qualcomm.com/iot/models/yamnet" target="_blank" style={{color:"#3253DC",fontWeight:600}}>YAMNET</a></td>
            <td style={{border:"1px solid #e2e8f0",padding:"8px",color:"#555",fontSize:"0.82rem",verticalAlign:"middle"}}>MobileNet-based audio event classifier trained on AudioSet.</td>
          </tr>

          <tr>
            <td colSpan={2} style={{border:"1px solid #e2e8f0",padding:"4px",verticalAlign:"top",width:"100%"}}>
              <Accordion title="Steps to Run on QIMSDK">
                <Accordion title="🟡 Float32 - Model Precision">
                  <Steps>
                    <Step title="Download Required Files">
                      | File                                                                                                                                                   | Save as              |
                      | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
                      | [Model](https://aihub.qualcomm.com/iot/models/yamnet)                                                                                                  | yamnet\_float.tflite |
                      | <a href="../labels/yamnet.json" download="yamnet.json">yamnet.json</a>                                                                                 | yamnet.json          |
                      | <a href="https://github.com/qualcomm/sample-apps-for-qualcomm-linux/raw/refs/heads/main/qualcomm-linux/artifacts/videos/demo_samples/">Input video</a> | video.mp4            |

                      <Note>
                        If any downloaded file is a `.zip` archive, extract it on your host machine before copying:
                        `unzip filename.zip`
                      </Note>
                    </Step>

                    <Step title="Copy Files to Device">
                      <CodeGroup>
                        ```bash SCP (SSH) theme={null}
                        # Replace $HOME to the appropriate device path before running the commands.
                        # For QLI:    /root
                        # For Ubuntu: /home/ubuntu
                        # Modify this based on your platform and ensure files are copied to the correct location on the device.

                        ssh <user>@<device-ip> "mkdir -p $HOME/{models,labels,media,media/output}"
                        scp yamnet_float.tflite  <user>@<device-ip>:$HOME/models/
                        scp yamnet.json          <user>@<device-ip>:$HOME/labels/
                        scp video.mp4            <user>@<device-ip>:$HOME/media/
                        ```
                      </CodeGroup>
                    </Step>

                    <Step title="Connect to device">
                      <CodeGroup>
                        ```bash SCP (SSH) theme={null}
                        # Run from your host machine — replace <user> and <device-ip>
                        ssh <user>@<device-ip>
                        ```
                      </CodeGroup>
                    </Step>

                    <Step title="Set Environment Variables">
                      ```bash Qualcomm Linux theme={null}
                      export MODEL_NAME=yamnet_float.tflite
                      export LABELS_NAME=yamnet.json
                      export SRC_VIDEO_NAME=video.mp4
                      ```
                    </Step>

                    <Step title="Run the Pipeline">
                      ```bash theme={null}
                      gst-launch-1.0 -e --gst-debug=2 filesrc location=$HOME/media/$SRC_VIDEO_NAME ! qtdemux name=demux demux. ! queue ! h264parse ! \
                      v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! qtivcomposer name=mixer sink_1::position="<50, 50>" sink_1::dimensions="<368, 64>" ! \
                      queue ! waylandsink fullscreen=true demux. ! queue ! flacparse ! flacdec ! queue ! audioconvert ! audioresample ! \
                      audiobuffersplit output-buffer-size=31200 ! queue ! qtimlaconverter  sample-rate=16000 feature=lmfe params="params,nfft=96,nhop=160,nmels=64,chunklen=0.96;" ! \
                      queue ! qtimltflite name=infeng model=$HOME/models/$MODEL_NAME ! qtimlpostprocess settings="{\"confidence\": 10.0}" results=3 module=yamnet \
                      labels=$HOME/labels/$LABELS_NAME ! video/x-raw,format=BGRA,width=368,height=64 ! queue ! mixer.
                      ```
                    </Step>
                  </Steps>
                </Accordion>
              </Accordion>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </Tab>
</Tabs>
