@broberg/ai-sdk 0.40.0 → 0.41.0
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/dist/{chunk-KXTCLLVF.js → chunk-B74RSBT5.js} +17 -8
- package/dist/chunk-B74RSBT5.js.map +1 -0
- package/dist/index.d.ts +22 -4
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/pricing.d.ts +92 -56
- package/dist/pricing.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-KXTCLLVF.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -39,13 +39,31 @@ declare function classifyRegionName(name: string | undefined): Region;
|
|
|
39
39
|
* is it?" — a narrower question than "where will my call go?". */
|
|
40
40
|
declare function regionOfProvider(provider: string): Region;
|
|
41
41
|
|
|
42
|
-
/** One dictionary entry. `alias` says it differently; `ipa` says it
|
|
42
|
+
/** One dictionary entry. `alias` says it differently; `ipa` says it in phonemes.
|
|
43
|
+
*
|
|
44
|
+
* **`ipa` is NOT the "more precise" option for a FOREIGN word — measured 2026-09-04.**
|
|
45
|
+
* Christian listened to `workflow` as `ˈwɜːkfloʊ` through the da-DK voices jeppe and
|
|
46
|
+
* christel and reported: *"ikke korrekt engelsk med et sjovt mix"*. A Danish neural
|
|
47
|
+
* voice renders English phonemes through Danish phonology, so foreign IPA comes out a
|
|
48
|
+
* hybrid rather than English. The symbols are honoured; the accent is not.
|
|
49
|
+
*
|
|
50
|
+
* So pick by what the word IS, not by which field sounds more exact:
|
|
51
|
+
* - a DANISH word the voice mispronounces → `ipa` does what you want.
|
|
52
|
+
* - an ENGLISH word inside Danish text → neither field is right yet. `alias` (spell it
|
|
53
|
+
* the way a Dane would say it) is the honest workaround today; a real engine switch
|
|
54
|
+
* is F051.2, and it is blocked on a listening test, not on code.
|
|
55
|
+
*
|
|
56
|
+
* Dated on purpose. This is a measurement of two specific voices on one date, not a
|
|
57
|
+
* permanent property of IPA — Azure ships new voices, and the next reader deserves to
|
|
58
|
+
* see that it may have moved. */
|
|
43
59
|
interface Pronunciation {
|
|
44
60
|
/** The word as it appears in the text. Matched whole-word, case-insensitively. */
|
|
45
61
|
word: string;
|
|
46
62
|
/** Say this instead. Azure `<sub alias>`; ElevenLabs plain substitution. */
|
|
47
63
|
alias?: string;
|
|
48
|
-
/** IPA phonemes. Azure `<phoneme alphabet="ipa" ph>`. ElevenLabs cannot do this
|
|
64
|
+
/** IPA phonemes. Azure `<phoneme alphabet="ipa" ph>`. ElevenLabs cannot do this
|
|
65
|
+
* (it THROWS rather than silently skipping). See the type doc above before reaching
|
|
66
|
+
* for this on a foreign word. */
|
|
49
67
|
ipa?: string;
|
|
50
68
|
/** Reserved for a future per-entry language switch; carried but not yet emitted. */
|
|
51
69
|
lang?: string;
|
|
@@ -2320,8 +2338,8 @@ declare const falStubAdapter: ProviderAdapter;
|
|
|
2320
2338
|
* wires the live adapters. */
|
|
2321
2339
|
declare const stubProviders: Record<string, ProviderAdapter>;
|
|
2322
2340
|
|
|
2323
|
-
declare const VERSION: "0.
|
|
2324
|
-
declare const SDK_TAG: "@broberg/ai-sdk@0.
|
|
2341
|
+
declare const VERSION: "0.41.0";
|
|
2342
|
+
declare const SDK_TAG: "@broberg/ai-sdk@0.41.0";
|
|
2325
2343
|
|
|
2326
2344
|
/** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
|
|
2327
2345
|
* per-call override.
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
listMediaPrices,
|
|
19
19
|
pricingFreshness,
|
|
20
20
|
pricingGeneratedAt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-B74RSBT5.js";
|
|
22
22
|
|
|
23
23
|
// src/transport/http.ts
|
|
24
24
|
async function httpTransport(req) {
|
|
@@ -1537,7 +1537,7 @@ function assertPronunciations(list, provider) {
|
|
|
1537
1537
|
}
|
|
1538
1538
|
if (p.alias !== void 0 && p.ipa !== void 0) {
|
|
1539
1539
|
throw new Error(
|
|
1540
|
-
`${provider} adapter: pronunciation "${p.word}" sets BOTH alias and ipa. They are different instructions \u2014 alias says it differently, ipa says it
|
|
1540
|
+
`${provider} adapter: pronunciation "${p.word}" sets BOTH alias and ipa. They are different instructions \u2014 alias says it differently, ipa says it in phonemes. Pick one.`
|
|
1541
1541
|
);
|
|
1542
1542
|
}
|
|
1543
1543
|
if (p.alias === void 0 && p.ipa === void 0) {
|
|
@@ -3093,8 +3093,8 @@ var aiConfigSchema = z.object({
|
|
|
3093
3093
|
});
|
|
3094
3094
|
|
|
3095
3095
|
// src/version.ts
|
|
3096
|
-
var VERSION = "0.
|
|
3097
|
-
var SDK_TAG = "@broberg/ai-sdk@0.
|
|
3096
|
+
var VERSION = "0.41.0";
|
|
3097
|
+
var SDK_TAG = "@broberg/ai-sdk@0.41.0";
|
|
3098
3098
|
|
|
3099
3099
|
// src/cost/sinks/upmetrics.ts
|
|
3100
3100
|
function upmetricsSink(config) {
|