Start to learn vocab from talkgroups to improve accuracy of STT
This commit is contained in:
@@ -93,4 +93,20 @@ export const c2api = {
|
||||
// Node key management
|
||||
reissueNodeKey: (nodeId: string) =>
|
||||
request(`/nodes/${nodeId}/reissue-key`, { method: "POST" }),
|
||||
|
||||
// Vocabulary
|
||||
getVocabulary: (systemId: string) =>
|
||||
request<{ vocabulary: string[]; vocabulary_pending: { term: string; source: string; added_at: string }[]; vocabulary_bootstrapped: boolean }>(
|
||||
`/systems/${systemId}/vocabulary`
|
||||
),
|
||||
bootstrapVocabulary: (systemId: string) =>
|
||||
request<{ added: number; terms: string[] }>(`/systems/${systemId}/vocabulary/bootstrap`, { method: "POST" }),
|
||||
addVocabularyTerm: (systemId: string, term: string) =>
|
||||
request(`/systems/${systemId}/vocabulary/terms`, { method: "POST", body: JSON.stringify({ term }) }),
|
||||
removeVocabularyTerm: (systemId: string, term: string) =>
|
||||
request(`/systems/${systemId}/vocabulary/terms`, { method: "DELETE", body: JSON.stringify({ term }) }),
|
||||
approvePendingTerm: (systemId: string, term: string) =>
|
||||
request(`/systems/${systemId}/vocabulary/pending/approve`, { method: "POST", body: JSON.stringify({ term }) }),
|
||||
dismissPendingTerm: (systemId: string, term: string) =>
|
||||
request(`/systems/${systemId}/vocabulary/pending/dismiss`, { method: "POST", body: JSON.stringify({ term }) }),
|
||||
};
|
||||
|
||||
@@ -13,11 +13,20 @@ export interface NodeRecord {
|
||||
approval_status: ApprovalStatus | null;
|
||||
}
|
||||
|
||||
export interface VocabularyPendingTerm {
|
||||
term: string;
|
||||
source: "induction" | "correction";
|
||||
added_at: string;
|
||||
}
|
||||
|
||||
export interface SystemRecord {
|
||||
system_id: string;
|
||||
name: string;
|
||||
type: string; // P25 | DMR | NBFM
|
||||
config: Record<string, unknown>;
|
||||
vocabulary?: string[];
|
||||
vocabulary_pending?: VocabularyPendingTerm[];
|
||||
vocabulary_bootstrapped?: boolean;
|
||||
}
|
||||
|
||||
export interface TranscriptSegment {
|
||||
|
||||
Reference in New Issue
Block a user