# How to stop testSpeaker?

**URL:** <https://devforum.zoom.us/t/how-to-stop-testspeaker/74615>\
**Category:** Web\
**Created:** [August 22, 2022, 8:12am UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615 "2022-08-22T08:12:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![efron.vit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/efron.vit/32/33711_2.png) [@efron.vit](https://devforum.zoom.us/u/efron.vit)\
**Post date:** [August 22, 2022, 8:12am UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/1 "2022-08-22T08:12:51Z")

</div>

I started the test, the melody is playing, but I haven’t found a way to stop it.  
How to stop testSpeaker ?

> **[LocalAudioTrack | Zoom Video SDK for Web - 1.6.0](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/localaudiotrack.html#testspeaker)**
>
> Documentation for Zoom Video SDK for Web - 1.6.0

I tried:

```auto
  /** Stops local audio capture */
  stop(): Promise<void | Error>;

  /** Mutes mic if audio was started, and mic is not already muted */
  mute(): Promise<void | Error>;

```

And also run the second test with the id of a non-existent device, but i get console message

> A tester is running,please stop it first

I was also looking for elements with the “audio” or “video” tag to stop them =)

But none of this helps…

Zoom Web Video SDK 1.4

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 22, 2022, 2:30pm UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/2 "2022-08-22T14:30:21Z")

</div>

Hey @efron.vit

Thanks for your feedback.

The `localAudioTrack.testSpeaker()` method returns a controller, using it to `stop` or `destroy` the tester.  
Here is the reference: [LocalAudioTrack | Zoom Video SDK for Web - 1.4.0](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/localaudiotrack.html#testspeaker)

If you are familiar with react, our react sample code gives a demo of how to use the tester. [videosdk-web-sample/preview.tsx at master · zoom/videosdk-web-sample · GitHub](https://github.com/zoom/videosdk-web-sample/blob/master/react-demo/src/feature/preview/preview.tsx#L207)

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![efron.vit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/efron.vit/32/33711_2.png) [@efron.vit](https://devforum.zoom.us/u/efron.vit)\
**Post date:** [August 22, 2022, 4:38pm UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/3 "2022-08-22T16:38:06Z")

</div>

Thank you very much for the quick response! This is what is needed. I program in Vue JS =)

---

<div class="post-metadata">

**Author:** ![efron.vit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/efron.vit/32/33711_2.png) [@efron.vit](https://devforum.zoom.us/u/efron.vit)\
**Post date:** [August 23, 2022, 5:58am UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/4 "2022-08-23T05:58:54Z")

</div>

@vic.yang, can we get the value of the current volume of this track for visualization?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [August 23, 2022, 6:31am UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/5 "2022-08-23T06:31:21Z")

</div>

Hey @efron.vit

The [TestSpeakerOption](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/testspeakeroption.html) allows you to set the `onAnalyseFrequency` callback, the callback will be invoked per 20ms with the `averageFrequency` payload, it’s another measurement of the sound. It can be used to visualize the sound.

In our [react sample app](https://github.com/zoom/videosdk-web-sample/blob/master/react-demo/src/feature/preview/preview.tsx#L214), we use it as the percent value of the progress bar.

P.S.  
[Some visualization examples and APIs in MDN.](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Visualizations_with_Web_Audio_API)

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![efron.vit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/efron.vit/32/33711_2.png) [@efron.vit](https://devforum.zoom.us/u/efron.vit)\
**Post date:** [August 23, 2022, 6:57am UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/6 "2022-08-23T06:57:33Z")

</div>

Oh my … , it’s beautiful

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 22, 2022, 4:58pm UTC](https://devforum.zoom.us/t/how-to-stop-testspeaker/74615/7 "2022-09-22T16:58:30Z")

</div>

Closed on September 22, 2022, 4:58pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
