@absolutejs/voice 0.0.22-beta.471 → 0.0.22-beta.473

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,47 @@ Use it when you want Vapi/Retell/Bland-style voice-agent capability, but you wan
8
8
 
9
9
  ## What's new
10
10
 
11
+ ### 0.0.22-beta.472 · Phase 6 — multilingual STT proof gate
12
+
13
+ `runVoiceMultilingualProof(...)` turns the `voice-fixtures-multilingual` corpus (FLEURS + BSC Catalan-Spanish code-switch + CoSHE Hindi-English code-switch) into a gateable readiness/proof artifact. Buyers evaluating Vapi-replacement can now run any combination of STT adapters against the multilingual corpus and assert per-language WER / pass-rate / term-recall budgets in CI.
14
+
15
+ ```ts
16
+ import {
17
+ buildVoiceMultilingualProofReadinessCheck,
18
+ renderVoiceMultilingualProofMarkdown,
19
+ runVoiceMultilingualProof,
20
+ } from "@absolutejs/voice";
21
+ import { deepgram } from "@absolutejs/voice-deepgram";
22
+ import { speechmatics } from "@absolutejs/voice-speechmatics";
23
+ import { soniox } from "@absolutejs/voice-soniox";
24
+
25
+ const report = await runVoiceMultilingualProof({
26
+ adapters: [
27
+ { adapter: deepgram({ apiKey, model: "nova-3" }), adapterId: "deepgram-nova3" },
28
+ { adapter: speechmatics({ apiKey, region: "eu2" }), adapterId: "speechmatics-enhanced" },
29
+ { adapter: soniox({ apiKey, enableLanguageIdentification: true }), adapterId: "soniox" },
30
+ ],
31
+ defaultThresholds: { maxAverageWordErrorRate: 0.30, minPassRate: 0.7 },
32
+ perLanguage: [
33
+ { language: "ca-es", label: "Catalan-Spanish code-switch", maxAverageWordErrorRate: 0.45 },
34
+ { language: "hi-en", label: "Hindi-English code-switch", maxAverageWordErrorRate: 0.50 },
35
+ ],
36
+ });
37
+
38
+ const readiness = buildVoiceMultilingualProofReadinessCheck(report, {
39
+ baseHref: "/voice/multilingual-proof",
40
+ });
41
+ // drop `readiness` into your VoiceProductionReadinessReport.checks array
42
+
43
+ await Bun.write("docs/multilingual-proof.md", renderVoiceMultilingualProofMarkdown(report));
44
+ ```
45
+
46
+ Highlights:
47
+ - Loads fixtures from `VOICE_FIXTURE_DIR` (or any caller-supplied directory list / pre-loaded `VoiceTestFixture[]`), filters by an optional predicate, and runs each adapter through the existing `runSTTAdapterBenchmark` harness — no new STT plumbing required.
48
+ - Buckets fixture results by `fixture.language` and applies per-language thresholds (`maxAverageWordErrorRate`, `minAverageWordAccuracyRate`, `minPassRate`, `minTermRecall`) layered over caller-provided `defaultThresholds`.
49
+ - Returns a structured report (`adapters[].languageReports[]` with metrics + failures, plus per-adapter and global `passes` flags) plus a Markdown renderer for human review and a `VoiceProductionReadinessCheck`-shaped helper for drop-in readiness wiring.
50
+ - Pairs naturally with every STT adapter shipped in `voice-adapters` (deepgram, assemblyai, azure streaming, speechmatics, gladia, soniox, google-speech streaming + buffered, openai-whisper buffered).
51
+
11
52
  ### 0.0.22-beta.471 · Vapi parity — `fromVapiAssistantConfig` adapter
12
53
 
13
54
  Mechanical migration from a Vapi Assistant JSON to a voice assistant. Pass the JSON dump (or a typed subset), provide a `modelFactory` that maps Vapi's `model.provider`+`model.model` to a voice `VoiceAgentModel`, and get back `{ assistant, tools, routeHints, unsupported }`.
package/dist/index.d.ts CHANGED
@@ -223,4 +223,8 @@ export { shapeTelephonyAssistantText } from "./telephony/response";
223
223
  export type { TelephonyResponseShapeMode, TelephonyResponseShapeOptions, } from "./telephony/response";
224
224
  export { buildVoiceProofPackInput, buildVoiceProofPack, buildVoiceProofPackFromObservabilityExport, createVoiceProofPackBuildContext, createVoiceProofRefreshSnapshot, createVoiceProofPackStaleWhileRefreshSource, createVoiceProofPackArtifacts, createVoiceProofPackOperationsRecordSection, createVoiceProofPackProductionReadinessSection, createVoiceProofPackProviderSloSection, createVoiceProofPackRoutes, createVoiceProofPackSupportBundleSection, renderVoiceProofPackMarkdown, writeVoiceProofPack, } from "./proofPack";
225
225
  export type { VoiceProofPack, VoiceProofPackBuildContext, VoiceProofPackBuildContextOptions, VoiceProofPackBuildTiming, VoiceProofPackEvidence, VoiceProofPackInput, VoiceProofPackInputBuilderLoaderInput, VoiceProofPackInputBuilderOperationsLoaderInput, VoiceProofPackInputBuilderOptions, VoiceProofPackInputBuilderSupportBundle, VoiceProofPackRefreshState, VoiceProofPackRefreshStatus, VoiceProofPackRoutesOptions, VoiceProofPackSection, VoiceProofPackSourceValue, VoiceProofPackStatus, VoiceProofPackStaleWhileRefreshSource, VoiceProofPackStaleWhileRefreshSourceOptions, VoiceProofPackWriteResult, VoiceProofRefreshSnapshot, VoiceProofRefreshSnapshotOptions, } from "./proofPack";
226
+ export { buildVoiceMultilingualProofReadinessCheck, renderVoiceMultilingualProofMarkdown, runVoiceMultilingualProof, } from "./multilingualProof";
227
+ export type { VoiceMultilingualLanguageCode, VoiceMultilingualProofAdapterEntry, VoiceMultilingualProofAdapterReport, VoiceMultilingualProofDefaultThresholds, VoiceMultilingualProofLanguageMetrics, VoiceMultilingualProofLanguageReport, VoiceMultilingualProofLanguageThresholds, VoiceMultilingualProofOptions, VoiceMultilingualProofReadinessCheck, VoiceMultilingualProofReadinessOptions, VoiceMultilingualProofReport, } from "./multilingualProof";
228
+ export { buildVoiceMonitorPlan, createVoiceInMemoryMonitorRegistry, createVoiceLiveMonitorRoutes, createVoiceMonitorSession, } from "./monitor";
229
+ export type { VoiceMonitorAudioEvent, VoiceMonitorAudioSource, VoiceMonitorAuthenticate, VoiceMonitorAuthenticateInput, VoiceMonitorControlAck, VoiceMonitorControlHandler, VoiceMonitorControlHandlerInput, VoiceMonitorControlMessage, VoiceMonitorMutableRegistry, VoiceMonitorPlan, VoiceMonitorPlanInput, VoiceMonitorRegistry, VoiceMonitorRegistryRegisterInput, VoiceLiveMonitorRoutesOptions, VoiceMonitorSessionRecord, } from "./monitor";
226
230
  export * from "./types";