title: How do I add an alarm sound when the status result is changed
body: <p>I'm using a webcam to detect changes in an environment. When a person walks into view of the webcam the Status displays "INTRUDER ALERT". I want an alarm to sound when this is displayed.</p>
  
  <p>Code:</p>
  
  <pre><code>while (true) {
  
  if (classifier.getNumClasses() &gt; 0) {
  
    // Get the activation from mobilenet from the webcam.
  
    const activation = net.infer(webcamElement, 'conv_preds');
  
    // Get the most likely class and confidences from the classifier module.
  
    const result = await classifier.predictClass(activation);
    const classes = ['SECURED', 'INTRUDER ALERT'];
    document.getElementById('console').innerText = `
      Status: ${classes[result.classIndex]}\n
      Accuracy: ${result.confidences[result.classIndex]}
    `;
  }
  
  await tf.nextFrame();
  </code></pre>