Optional calls
Add Glossary
Add Glossary
The addGlossary mutation adds a glossary correction entry to the user account. It is applied retroactively to all agenda items, text segments, and task items of the given protocol.
Use this to fix recurring transcription errors — for example, names or technical terms that the model consistently transcribes incorrectly.
GraphQL Mutation
mutation AddGlossary(
$protocolSlug: String!
$term: String!
$correctWord: String!
) {
addGlossary(
protocolSlug: $protocolSlug
term: $term
correctWord: $correctWord
) {
success
}
}
Mutation Variables
{
"protocolSlug": "PROTOCOL_SLUG",
"term": "Buergermeister",
"correctWord": "Bürgermeister"
}
term— The incorrect word as it appears in the transcript.correctWord— The correct replacement.
Example JavaScript Implementation
import axios from "axios";
async function addGlossary(protocolSlug, term, correctWord) {
try {
const response = 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: ADD_GLOSSARY,
variables: { protocolSlug, term, correctWord },
}),
});
const data = response.data.data.addGlossary;
if (data.success) {
console.log(`Glossary entry added: "${term}" → "${correctWord}"`);
}
} catch (error) {
console.error("Error adding glossary entry:", error);
}
}
// Example usage
addGlossary("my-protocol-slug", "Buergermeister", "Bürgermeister");
Notes
- The correction is saved to your user account and will be applied to future protocols as well.
- The retroactive replacement runs across all text segments, agenda items, and task items of the given protocol at the time of the call.
Have questions?
Still have questions? Talk to support.