Optional calls
Get Transcript by Agenda Item Id
Use this API to fetch transcript textsegments between a start and an end id. The response includes speaker metadata and timestamps for each textsegment.
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
}
}
Usage notes:
protocolSlug(required): Identifier of the protocol. Get this from the core API calls.agendaItemId(required): ID of the agenda item where you want to see the connected textsegments.
JavaScript example
import axios from "axios";
async function getTranscriptByAgendaItemId(protocolSlug, agendaItemId) {
const dataObj = {
query: GET_TRANSCRIPT_BY_AGENDA_ITEM_ID,
variables: { protocolSlug, agendaItemId },
};
try {
const response = await axios({
method: "post",
url: "https://api-v2.speechmind.com/external/v2/graphql",
data: JSON.stringify(dataObj),
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.SPEECHMIND_API_KEY,
},
});
return response.data.data.getTranscriptByAgendaItemId;
} catch (error) {
console.error(error);
throw error;
}
} Have questions?
Still have questions? Talk to support.