menu button

Optional calls

Get Transcript by Agenda Item Id

Get Transcript by Agenda Item Id

Use the getTranscriptByAgendaItemId query to fetch all transcript textsegments belonging to a specific agenda item. The response includes speaker metadata and timestamps for each segment.


Input Parameters

  • protocolSlug (String!) — identifier of the protocol.
  • agendaItemId (String!) — ID of the agenda item whose textsegments you want to retrieve.

GraphQL Query

fragment transcriptDetails on TranscriptSegment {
  text
  startTime
  endTime
}

fragment apiSpeakerDetails on ApiSpeakerType {
  slug
  gender
  givenName
  familyName
  preTitle
  postTitle
  posShort
  posLong
  systemId
}

query GetTranscriptByAgendaItemId($protocolSlug: String!, $agendaItemId: String!) {
  getTranscriptByAgendaItemId(protocolSlug: $protocolSlug, agendaItemId: $agendaItemId) {
    id
    speakerObj {
      ...apiSpeakerDetails
    }
    textJson {
      ...transcriptDetails
    }
    pos
  }
}

Query Variables

{
  "protocolSlug": "PROTOCOL_SLUG",
  "agendaItemId": "AGENDA_ITEM_ID"
}

Example JavaScript Implementation

import axios from "axios";

async function getTranscriptByAgendaItemId(protocolSlug, agendaItemId) {
  const res = await axios({
    method: "POST",
    url: "https://api-v2.speechmind.com/external/v2/graphql",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": process.env.SPEECHMIND_API_KEY,
    },
    data: JSON.stringify({
      query: GET_TRANSCRIPT_BY_AGENDA_ITEM_ID,
      variables: { protocolSlug, agendaItemId },
    }),
  });

  return res.data.data.getTranscriptByAgendaItemId;
}

Notes

  • Each returned textsegment includes id, pos (position in the protocol), speaker details, and word-level timestamps via textJson.
  • Obtain the agendaItemId from the agendaItemList returned by getResults.

Have questions?

Still have questions? Talk to support.