namu-ai 0.1.1 → 0.1.2
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/CHANGELOG.md +5 -0
- package/README.md +1 -0
- package/dist/client.d.ts +4 -1
- package/dist/client.js +4 -2
- package/dist/types.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 (29 November 2026)
|
|
4
|
+
|
|
5
|
+
`converse` takes `language`: the language the person speaks and the agent answers in (Hausa when not given; also
|
|
6
|
+
Zarma, Fulfulde, Kanuri and Tamasheq). `ConverseTurn` gains `language`.
|
|
7
|
+
|
|
3
8
|
## 0.1.1 (27 November 2026)
|
|
4
9
|
|
|
5
10
|
The README's Data section now says only what Namu keeps: usage records, not your audio or text. No code changes.
|
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ const spoken = await namu.translate({ audio: await readFile("question.ogg") }, {
|
|
|
38
38
|
|
|
39
39
|
// Voice agent (research preview; the key needs the converse scope)
|
|
40
40
|
const turn = await namu.converse(await readFile("hello.ogg"), { sessionId: "demo-42" });
|
|
41
|
+
const fulfulde = await namu.converse(await readFile("sannu.ogg"), { persona: "mouhamad", language: "ff" }); // also ha, dje, kr, tmh
|
|
41
42
|
|
|
42
43
|
// Account and catalogue
|
|
43
44
|
await namu.usage(); // { month_audio_seconds_used, month_audio_seconds_limit }
|
package/dist/client.d.ts
CHANGED
|
@@ -46,10 +46,13 @@ export declare class Namu {
|
|
|
46
46
|
source?: "ha" | "fr";
|
|
47
47
|
includeAudio?: boolean;
|
|
48
48
|
}): Promise<Translation>;
|
|
49
|
-
/** One turn with the voice agent
|
|
49
|
+
/** One turn with the voice agent (research preview; the key needs the converse scope). `language` is the language the
|
|
50
|
+
person speaks and the agent answers in: Hausa ("ha") when not given, or "dje", "ff", "kr", "tmh" (models() lists
|
|
51
|
+
them); the persona "mouhamad" speaks them all, "nadia" Hausa only. */
|
|
50
52
|
converse(audio: AudioInput, opts?: {
|
|
51
53
|
sessionId?: string;
|
|
52
54
|
persona?: string;
|
|
55
|
+
language?: string;
|
|
53
56
|
}): Promise<ConverseTurn>;
|
|
54
57
|
/** Audio seconds used this calendar month (UTC) and the allowance. Free: counts nothing. */
|
|
55
58
|
usage(): Promise<Usage>;
|
package/dist/client.js
CHANGED
|
@@ -47,9 +47,11 @@ export class Namu {
|
|
|
47
47
|
}
|
|
48
48
|
return (await this.#request("POST", "/v1/translate", { form: { file: input.audio, target, source: opts.source, include_audio: opts.includeAudio ? "true" : undefined } })).json();
|
|
49
49
|
}
|
|
50
|
-
/** One turn with the voice agent
|
|
50
|
+
/** One turn with the voice agent (research preview; the key needs the converse scope). `language` is the language the
|
|
51
|
+
person speaks and the agent answers in: Hausa ("ha") when not given, or "dje", "ff", "kr", "tmh" (models() lists
|
|
52
|
+
them); the persona "mouhamad" speaks them all, "nadia" Hausa only. */
|
|
51
53
|
async converse(audio, opts = {}) {
|
|
52
|
-
return (await this.#request("POST", "/v1/converse", { form: { file: audio, persona: opts.persona ?? "nadia", session_id: opts.sessionId } })).json();
|
|
54
|
+
return (await this.#request("POST", "/v1/converse", { form: { file: audio, persona: opts.persona ?? "nadia", language: opts.language, session_id: opts.sessionId } })).json();
|
|
53
55
|
}
|
|
54
56
|
/** Audio seconds used this calendar month (UTC) and the allowance. Free: counts nothing. */
|
|
55
57
|
async usage() {
|
package/dist/types.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface Translation {
|
|
|
31
31
|
export interface ConverseTurn {
|
|
32
32
|
model: string;
|
|
33
33
|
persona: string;
|
|
34
|
+
/** The language of the turn: what the person spoke and the agent answered in. */
|
|
35
|
+
language: string;
|
|
34
36
|
session_id: string | null;
|
|
35
37
|
/** What the person said, as text. */
|
|
36
38
|
heard: string;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namu-ai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The Namu API for JavaScript and TypeScript: speech recognition, speech synthesis and translation for Hausa, Zarma and French.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Namu AI Lab <contact@namuai.org>",
|