Media (Audio/Video)

Update Transcript Speakers

Request Description

This API endpoint allows you to update speaker names in the transcription of a media object.

Endpoint

PUT /v1/media/speakers/:mediaId

Method

PUT

Purpose

The purpose of this request is to update the speaker information associated with a specific media object. This includes modifying the names of the speakers in the transcription data.

Input Parameters

  • mediaId (path parameter): The unique identifier for the media object whose speaker information you wish to update.

  • Request Body: The request body should be a JSON array containing objects with the following structure:

  • id (string): The unique identifier for the speaker (ORIGINAL).

  • name (string): The new name of the speaker.

Response Structure

The response will return a JSON object containing the following fields:

  • status: Indicates the status of the request.

  • message: String

Example Response

{
 "status": "",
 "message": ""
}

Notes

  • Ensure that the mediaId provided in the URL corresponds to an existing media object.

  • The request body must be formatted as a JSON array, even if updating a single speaker.

  • The response will confirm the status of the update operation, along with any relevant data about the media analysis.

Request rules. The body is an array, one entry per speaker you are relabelling, and every entry needs id and name. Omit segmentIds to relabel every segment for that speaker, or pass them to limit the rename to one paragraph. Pass mergeIntoId to merge this speaker into an existing one.

put/media/speakers/{mediaId}

Request

  • Base URL: https://api.speakai.co/v1
  • URL: https://api.speakai.co/v1/media/speakers/{mediaId}
  • Auth: API key in header x-speakai-key and API key in header x-access-token

Path parameters

mediaIdstring required

Request body

idstring required

The speaker you are renaming, given as either the speaker's current label or its numeric speaker id. Required on every array entry. Trimmed. The server matches the current label first and the numeric id second (resolveTargetSpeaker at, so a label wins when both could match.

namestring required

The new name for that speaker. Required on every array entry. Trimmed. Reusing another speaker's name returns 400 unless you also send mergeIntoId on the same entry.

segmentIdsnumber[]

The transcript segment ids you want renamed. Send it to limit the change to one paragraph, and leave it out to rename every segment belonging to that speaker. Optional. Items must be numbers. No minimum or maximum item count.

mergeIntoIdstring

The id of the speaker you are merging this one into. Sending it confirms you meant to combine two speakers, so the duplicate name check is skipped for this entry. Optional. An empty string is allowed, and an empty string counts as not set.

Response

OK

statusstring

Changes

No recorded changes to this operation across all 2 revisions of this API.