# EstimateSpeakerThreshold

Calculates the threshold that is necessary to distinguish between a specified speaker and an unknown speaker.

NOTE: You only need to run this action if the audio you want to process contains unknown speakers.

Before running this action:

- Add and train all of your known speakers. Add a speaker with the action NewSpeaker. Add audio samples for the speaker by running the action AddSpeakerAudio with the parameter `training=true`. Then train the speaker with the action BuildSpeaker, or train all speakers with the action BuildAllSpeakers.
- Add audio samples for estimating thresholds to every known speaker (using the action AddSpeakerAudio with the parameter `training=false`).
- Add audio samples representing unknown speakers (using the action AddUnknownSpeakerAudio).

For more information about training speaker identification, refer to the Media Server Administration Guide.

Type: synchronous

Parameter | Description | Required
--- | --- | ---
`bias` | The bias to use when calculating the threshold, as a number from `0` to `1`. The default value is `0.3` and this is suitable in most cases. Using a higher value increases the calculated threshold, which can result in fewer false positives. Using a lower value decreases the threshold, which can result in fewer missed results (better recall). | No
`database` | The name of the database that contains the speaker. | Yes
`identifier` | The identifier of the speaker to calculate the threshold for. | Yes

## Example

    /action=EstimateSpeakerThreshold&database=news&identifier=newsreader

## Response

This action is asynchronous, so Media Server always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of the action:

     <autnresponse>
      <action>QUEUEINFO</action>
      <response>SUCCESS</response>
      <responsedata>
        <actions>
          <action>
            <status>Finished</status>
            <queued_time>2018-May-22 05:55:26</queued_time>
            <time_in_queue>2</time_in_queue>
            <process_start_time>2018-May-22 05:55:28</process_start_time>
            <time_processing>433</time_processing>
            <process_end_time>2018-May-22 06:02:41</process_end_time>
            <speaker>
              <bias>0.3</bias>
              <database>news</database>
              <identifier>newsreader</identifier>
              <numFiles>7</numFiles>
              <numFilesDone>7</numFilesDone>
              <precision>98.6</precision>
              <recall>100.0</recall>
              <score>99.3</score>
              <status>Finished</status>
              <threshold>34</threshold>
            </speaker>
            <token>...</token>
          </action>
        </actions>
      </responsedata>
    </autnresponse>

The `threshold` element contains the calculated threshold.

## See Also

- To calculate thresholds for all of your speakers, use the action EstimateAllSpeakerThresholds.

_FT_HTML5_bannerTitle.htm