nixamp 0.37.1 → 0.37.3
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/ai-keys.d.ts +1 -1
- package/dist/ai-keys.js +5 -1
- package/dist/ai-routes.js +2 -1
- package/dist/ai-text.js +75 -51
- package/dist/server.js +1 -0
- package/dist/station-cli.js +2 -2
- package/dist/station-routes.d.ts +2 -0
- package/dist/station-routes.js +9 -2
- package/dist/station-usage.d.ts +1 -1
- package/dist/station-usage.js +2 -1
- package/dist/stations.js +2 -0
- package/package.json +1 -1
- package/src/ai-keys.ts +5 -1
- package/src/ai-routes.ts +2 -1
- package/src/ai-text.ts +35 -15
- package/src/server.ts +1 -0
- package/src/station-cli.ts +2 -2
- package/src/station-routes.ts +11 -2
- package/src/station-usage.ts +2 -1
- package/src/stations.ts +1 -0
- package/web/dist/assets/{ar-CO5BKvO0.js → ar-M-rJ-i8u.js} +1 -1
- package/web/dist/assets/{cs-BUpUmRvP.js → cs-DIDjmSmj.js} +1 -1
- package/web/dist/assets/{da-zX4iMHja.js → da-mz0EqGwk.js} +1 -1
- package/web/dist/assets/{de-Tn7jOSGa.js → de-Bn3AucNg.js} +1 -1
- package/web/dist/assets/{es-7u7Y8_4k.js → es-ByK9v1xB.js} +1 -1
- package/web/dist/assets/{fi-V6JD2KmM.js → fi-CLniYyab.js} +1 -1
- package/web/dist/assets/{fr-Cywrbe0W.js → fr-D1wL3tO9.js} +1 -1
- package/web/dist/assets/{hi-Bi1gVC9W.js → hi-C7nhAaqc.js} +1 -1
- package/web/dist/assets/{hls-3VKVEQE3-DiRfULQE.js → hls-3VKVEQE3-jTDhndWc.js} +1 -1
- package/web/dist/assets/{hu-R_kphMiO.js → hu-BYQN--o4.js} +1 -1
- package/web/dist/assets/{id-DsjVfoDE.js → id-C9nWiAaF.js} +1 -1
- package/web/dist/assets/{it-D_Jw0vo4.js → it-C1B7Zioo.js} +1 -1
- package/web/dist/assets/{main-26sEJB31.js → main-D0g9H121.js} +2 -2
- package/web/dist/assets/{mpegts-DCmyLJq-.js → mpegts-BsYkrVdS.js} +1 -1
- package/web/dist/assets/{mpegts-LO6RVLD6-BCbjcAdN.js → mpegts-LO6RVLD6-Bb_fz5oU.js} +1 -1
- package/web/dist/assets/{nl-D_AiIeeo.js → nl-CyciFDJY.js} +1 -1
- package/web/dist/assets/{ru-BalU1IsS.js → ru-z2rPXuyZ.js} +1 -1
- package/web/dist/assets/{sv-CRhToKKj.js → sv-DrDn-9vi.js} +1 -1
- package/web/dist/assets/{uk-BzTMYhrk.js → uk-Cuf4DVDl.js} +1 -1
- package/web/dist/assets/{vi-DkoVH56o.js → vi-tIwkw_Y8.js} +1 -1
- package/web/dist/assets/{zh-DHjjJx8Z.js → zh-B2HJfTvl.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/sw.js +22 -22
package/dist/ai-keys.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AI_KEY_NAMES: readonly ["ELEVENLABS_API_KEY", "GEMINI_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY"];
|
|
1
|
+
export declare const AI_KEY_NAMES: readonly ["ELEVENLABS_API_KEY", "GEMINI_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "NIXAMP_OPENAI_URL", "NIXAMP_OPENAI_MODEL"];
|
|
2
2
|
export type AiKeyName = (typeof AI_KEY_NAMES)[number];
|
|
3
3
|
export declare function aiKeysFile(): string;
|
|
4
4
|
/** The key, from the environment or ai.json; "" when neither has it. */
|
package/dist/ai-keys.js
CHANGED
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { stateDir } from "./daemon.js";
|
|
12
|
-
export const AI_KEY_NAMES = [
|
|
12
|
+
export const AI_KEY_NAMES = [
|
|
13
|
+
"ELEVENLABS_API_KEY", "GEMINI_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY",
|
|
14
|
+
// Any OpenAI-compatible endpoint in OpenAI's place (Cloudflare Workers AI, Ollama, ...) and its model.
|
|
15
|
+
"NIXAMP_OPENAI_URL", "NIXAMP_OPENAI_MODEL",
|
|
16
|
+
];
|
|
13
17
|
export function aiKeysFile() {
|
|
14
18
|
return join(stateDir(), "ai.json");
|
|
15
19
|
}
|
package/dist/ai-routes.js
CHANGED
|
@@ -94,7 +94,8 @@ export async function handleAiRoutes(request, response, path, url, ctx) {
|
|
|
94
94
|
return true;
|
|
95
95
|
}
|
|
96
96
|
if (method === "POST") {
|
|
97
|
-
|
|
97
|
+
shares.configure(await jsonBody(ctx, request));
|
|
98
|
+
ctx.json(response, 200, { setting: shares.setting() });
|
|
98
99
|
return true;
|
|
99
100
|
}
|
|
100
101
|
}
|
package/dist/ai-text.js
CHANGED
|
@@ -41,62 +41,86 @@ export function hasModel(env = process.env) {
|
|
|
41
41
|
export async function askJson(options) {
|
|
42
42
|
const env = options.env ?? process.env;
|
|
43
43
|
const send = options.fetcher ?? fetch;
|
|
44
|
-
const signal = AbortSignal.timeout(options.timeoutMs ?? 30_000);
|
|
45
44
|
const gemini = aiKey("GEMINI_API_KEY", env);
|
|
46
45
|
const openai = aiKey("OPENAI_API_KEY", env);
|
|
47
46
|
const anthropic = aiKey("ANTHROPIC_API_KEY", env);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
// Each model with a key, in turn: one that refuses this server (Gemini
|
|
48
|
+
// answers 400 "User location is not supported" from some networks) or is
|
|
49
|
+
// down is not a reason to go without when another can answer.
|
|
50
|
+
const tries = [];
|
|
51
|
+
if (gemini)
|
|
52
|
+
tries.push(async () => {
|
|
53
|
+
const model = env["NIXAMP_GEMINI_MODEL"] || "gemini-flash-latest";
|
|
54
|
+
const response = await send(`https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent`, {
|
|
55
|
+
method: "POST",
|
|
56
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
57
|
+
headers: { "content-type": "application/json", "x-goog-api-key": gemini },
|
|
58
|
+
body: JSON.stringify({
|
|
59
|
+
systemInstruction: { parts: [{ text: options.system }] },
|
|
60
|
+
contents: [{ role: "user", parts: [{ text: options.prompt }] }],
|
|
61
|
+
generationConfig: { responseMimeType: "application/json", temperature: 0.9 },
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
if (!response.ok) {
|
|
65
|
+
const said = (await response.json().catch(() => ({})));
|
|
66
|
+
throw new Error(`gemini answered HTTP ${response.status}${said.error?.message ? `: ${said.error.message}` : ""}`);
|
|
67
|
+
}
|
|
68
|
+
const body = (await response.json());
|
|
69
|
+
const text = body.candidates?.[0]?.content?.parts?.map((one) => one.text ?? "").join("") ?? "";
|
|
70
|
+
return { model, value: firstObject(text) };
|
|
59
71
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
if (openai)
|
|
73
|
+
tries.push(async () => {
|
|
74
|
+
// OpenAI, or anything that speaks its chat completions (Cloudflare
|
|
75
|
+
// Workers AI's /ai/v1, Ollama's /v1): NIXAMP_OPENAI_URL is that base.
|
|
76
|
+
const baseUrl = (aiKey("NIXAMP_OPENAI_URL", env) || "https://api.openai.com/v1").replace(/\/+$/, "");
|
|
77
|
+
const official = new URL(baseUrl).host === "api.openai.com";
|
|
78
|
+
const model = aiKey("NIXAMP_OPENAI_MODEL", env) || "gpt-4.1-mini";
|
|
79
|
+
const response = await send(`${baseUrl}/chat/completions`, {
|
|
80
|
+
method: "POST",
|
|
81
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
82
|
+
headers: { "content-type": "application/json", authorization: `Bearer ${openai}` },
|
|
83
|
+
body: JSON.stringify({
|
|
84
|
+
model,
|
|
85
|
+
// Not every compatible server knows json_object; the answer is read for its JSON either way.
|
|
86
|
+
...(official ? { response_format: { type: "json_object" } } : {}),
|
|
87
|
+
messages: [{ role: "system", content: options.system }, { role: "user", content: options.prompt }],
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
90
|
+
if (!response.ok)
|
|
91
|
+
throw new Error(`${official ? "openai" : new URL(baseUrl).host} answered HTTP ${response.status}`);
|
|
92
|
+
const body = (await response.json());
|
|
93
|
+
return { model, value: firstObject(body.choices?.[0]?.message?.content ?? "") };
|
|
77
94
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
if (anthropic)
|
|
96
|
+
tries.push(async () => {
|
|
97
|
+
const model = env["NIXAMP_ANTHROPIC_MODEL"] || "claude-haiku-5-5";
|
|
98
|
+
const response = await send("https://api.anthropic.com/v1/messages", {
|
|
99
|
+
method: "POST",
|
|
100
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
101
|
+
headers: { "content-type": "application/json", "x-api-key": anthropic, "anthropic-version": "2023-06-01" },
|
|
102
|
+
body: JSON.stringify({
|
|
103
|
+
model,
|
|
104
|
+
max_tokens: 1024,
|
|
105
|
+
system: `${options.system}\nAnswer with one JSON object and nothing else.`,
|
|
106
|
+
messages: [{ role: "user", content: options.prompt }],
|
|
107
|
+
}),
|
|
108
|
+
});
|
|
109
|
+
if (!response.ok)
|
|
110
|
+
throw new Error(`anthropic answered HTTP ${response.status}`);
|
|
111
|
+
const body = (await response.json());
|
|
112
|
+
return { model, value: firstObject(body.content?.filter((one) => one.type === "text").map((one) => one.text ?? "").join("") ?? "") };
|
|
95
113
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
if (tries.length === 0)
|
|
115
|
+
throw new NoModel();
|
|
116
|
+
const failures = [];
|
|
117
|
+
for (const attempt of tries) {
|
|
118
|
+
try {
|
|
119
|
+
return await attempt();
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
failures.push(error.message);
|
|
123
|
+
}
|
|
100
124
|
}
|
|
101
|
-
throw new
|
|
125
|
+
throw new Error(failures.join("; "));
|
|
102
126
|
}
|
package/dist/server.js
CHANGED
|
@@ -2335,6 +2335,7 @@ export function createHandler(engine, options) {
|
|
|
2335
2335
|
return selectStationFiles(engine, body);
|
|
2336
2336
|
},
|
|
2337
2337
|
trackFor: (file) => trackFor(engine, file),
|
|
2338
|
+
...(options.library ? { isVideo: (file) => options.library.index.itemAt(file)?.video === true } : {}),
|
|
2338
2339
|
base: `${scheme}://${request.headers.host ?? "localhost"}`,
|
|
2339
2340
|
publicBase: options.stations.publicBase?.() ?? "",
|
|
2340
2341
|
json,
|
package/dist/station-cli.js
CHANGED
|
@@ -278,7 +278,7 @@ async function aiCommand(argv, call, show, json) {
|
|
|
278
278
|
const describe = (one) => [
|
|
279
279
|
`${String(one["name"])} [${String(one["key"])}]${one["enabled"] ? "" : " (off)"}`,
|
|
280
280
|
` style ${String(one["style"])}`,
|
|
281
|
-
` tracks ${
|
|
281
|
+
` tracks ${Array.isArray(one["tracks"]) ? one["tracks"].length : Number(one["tracks"] ?? 0)} of ${String(one["trackSeconds"])} s, ${String(one["perDay"])} a day${one["vocals"] ? ", with vocals" : ""}`,
|
|
282
282
|
` station ${one["stationId"] ? String(one["stationId"]) : "made with its first track"}${one["publish"] ? ", public on the guide" : ", unlisted"}`,
|
|
283
283
|
...(one["lastError"] ? [` problem ${String(one["lastError"])}`] : []),
|
|
284
284
|
].join("\n");
|
|
@@ -338,7 +338,7 @@ async function aiCommand(argv, call, show, json) {
|
|
|
338
338
|
...(has(argv, "--off") ? { enabled: false } : has(argv, "--on") ? { enabled: true } : {}),
|
|
339
339
|
...(has(argv, "--vocals") ? { vocals: true } : has(argv, "--instrumental") ? { vocals: false } : {}),
|
|
340
340
|
};
|
|
341
|
-
return show(await call("PATCH", `/api/v1/stations/ai/stations/${key}`, body), (answer) => describe(
|
|
341
|
+
return show(await call("PATCH", `/api/v1/stations/ai/stations/${key}`, body), (answer) => describe(answer["station"]));
|
|
342
342
|
}
|
|
343
343
|
case "remove": {
|
|
344
344
|
if (!key) {
|
package/dist/station-routes.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export interface StationContext {
|
|
|
38
38
|
artist: string;
|
|
39
39
|
album: string;
|
|
40
40
|
} | null;
|
|
41
|
+
/** Whether the library knows this file as moving picture; absent in tests that do not care. */
|
|
42
|
+
isVideo?: (file: string) => boolean;
|
|
41
43
|
/** This server's address as the asker reached it, for links. */
|
|
42
44
|
base: string;
|
|
43
45
|
/**
|
package/dist/station-routes.js
CHANGED
|
@@ -35,6 +35,9 @@ export function publicView(ctx, station) {
|
|
|
35
35
|
const file = state === "live" || state === "recovering" ? nowPlayingFile(ctx, station) : "";
|
|
36
36
|
// The tags the player read when it put this file on, else the library's.
|
|
37
37
|
const track = file ? (ctx.channels.tagsOf(channelOf(station.id), file) ?? ctx.trackFor(file)) : null;
|
|
38
|
+
// What the channel is carrying wins over the flag: a station made by hand
|
|
39
|
+
// from films streams video whether or not anyone said so.
|
|
40
|
+
const video = station.video || ctx.channels.kindOf(channelOf(station.id)) === "video";
|
|
38
41
|
return {
|
|
39
42
|
id: station.id,
|
|
40
43
|
name: station.name,
|
|
@@ -43,8 +46,8 @@ export function publicView(ctx, station) {
|
|
|
43
46
|
state,
|
|
44
47
|
// Tags, or nothing: a bare file name is the owner's, not the public's.
|
|
45
48
|
nowPlaying: track && (track.title || track.artist) ? track : null,
|
|
46
|
-
kind:
|
|
47
|
-
format: state === "stopped" || state === "offline" ? null :
|
|
49
|
+
kind: video ? "video" : "audio",
|
|
50
|
+
format: state === "stopped" || state === "offline" ? null : video
|
|
48
51
|
? { codec: "h264+aac", bitrateKbps: station.bitrate, sampleRate: 48_000, channels: 2 }
|
|
49
52
|
: { codec: "mp3", bitrateKbps: station.bitrate, sampleRate: 48_000, channels: 2 },
|
|
50
53
|
listeners: ctx.runner.listeners(station.id),
|
|
@@ -277,6 +280,10 @@ export async function handleStations(request, response, path, url, ctx) {
|
|
|
277
280
|
const items = ctx.select(input);
|
|
278
281
|
if (items === null)
|
|
279
282
|
throw new StationError("items_required", "choose files by track index (items) or a folder");
|
|
283
|
+
// Unsaid, a station is TV when most of its files are.
|
|
284
|
+
if (input["video"] === undefined && ctx.isVideo) {
|
|
285
|
+
input["video"] = items.filter((file) => ctx.isVideo(file)).length * 2 > items.length;
|
|
286
|
+
}
|
|
280
287
|
const station = ctx.store.create(input, items, ctx.account, Date.now(), key);
|
|
281
288
|
ctx.json(response, 201, { station: ownerView(ctx, station), created: true });
|
|
282
289
|
return true;
|
package/dist/station-usage.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** `nixamp station` usage, apart so `nixamp help station` does not load the client. */
|
|
2
|
-
export declare const USAGE = "nixamp station \u2014 make a collection into a station\n\n nixamp station list\n nixamp station create --name NAME (--folder PATH | --playlist ID | --items 0,1,2) [--shuffle] [--no-repeat] [--bitrate 128] [--breaks 600]\n nixamp station show ID\n nixamp station status ID\n nixamp station start ID\n nixamp station stop ID\n nixamp station skip ID\n nixamp station breaks ID SECONDS a spot between entries every SECONDS (120..86400; --off for none)\n nixamp station retry ID try every left-out file again\n nixamp station publish ID --basis owned|permission|licensed|public-domain [--note TEXT] [--unlisted] [--no-list]\n nixamp station unpublish ID [--private]\n nixamp station link ID [--rotate]\n nixamp station delete ID\n nixamp station guide-host NAME [--remove]\n NAME's front page is the public station guide (e.g. a Moshpit name)\n nixamp station auto [--no-video] [--min 10] [--films 3] [--tv 2] [--breaks 600] [--no-start]\n a station per genre, kept in step with the library (--off stops it)\n\n AI radio (music composed for a station, a few tracks a day):\n nixamp station ai what is composing, this month's seconds, the stations\n nixamp station ai create (--preset lofi|synthwave|ambient|chiptune|punk|jazz | --name NAME --style TEXT)\n [--vocals] [--seconds 120] [--per-day 2] [--unlisted] public on the guide unless --unlisted\n nixamp station ai generate KEY compose one now\n nixamp station ai set KEY [--style TEXT] [--per-day N] [--seconds N] [--off|--on]\n nixamp station ai remove KEY [--files]\n nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)\n nixamp station ai resume after the provider ran out of credit\n nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY, from stdin\n\n Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):\n nixamp station shares the setting and what is waiting\n nixamp station shares on [--owner-moderation] [--unlisted] [--max-mb 60] [--per-hour 6]\n nixamp station shares off\n nixamp station shares list [--state held|approved|reported|rejected]\n nixamp station shares approve|reject|delete SHARE\n nixamp station shares trust ADDRESS [--remove] believe this proxy's X-Forwarded-For\n\n --json machine-readable output\n --url, --key another server, as with `nixamp admin`\n\nA new station is private and stopped. Starting it does not publish it.";
|
|
2
|
+
export declare const USAGE = "nixamp station \u2014 make a collection into a station\n\n nixamp station list\n nixamp station create --name NAME (--folder PATH | --playlist ID | --items 0,1,2) [--shuffle] [--no-repeat] [--bitrate 128] [--breaks 600]\n nixamp station show ID\n nixamp station status ID\n nixamp station start ID\n nixamp station stop ID\n nixamp station skip ID\n nixamp station breaks ID SECONDS a spot between entries every SECONDS (120..86400; --off for none)\n nixamp station retry ID try every left-out file again\n nixamp station publish ID --basis owned|permission|licensed|public-domain [--note TEXT] [--unlisted] [--no-list]\n nixamp station unpublish ID [--private]\n nixamp station link ID [--rotate]\n nixamp station delete ID\n nixamp station guide-host NAME [--remove]\n NAME's front page is the public station guide (e.g. a Moshpit name)\n nixamp station auto [--no-video] [--min 10] [--films 3] [--tv 2] [--breaks 600] [--no-start]\n a station per genre, kept in step with the library (--off stops it)\n\n AI radio (music composed for a station, a few tracks a day):\n nixamp station ai what is composing, this month's seconds, the stations\n nixamp station ai create (--preset lofi|synthwave|ambient|chiptune|punk|jazz | --name NAME --style TEXT)\n [--vocals] [--seconds 120] [--per-day 2] [--unlisted] public on the guide unless --unlisted\n nixamp station ai generate KEY compose one now\n nixamp station ai set KEY [--style TEXT] [--per-day N] [--seconds N] [--off|--on]\n nixamp station ai remove KEY [--files]\n nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)\n nixamp station ai resume after the provider ran out of credit\n nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,\n NIXAMP_OPENAI_URL | NIXAMP_OPENAI_MODEL (an OpenAI-compatible stand-in), from stdin\n\n Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):\n nixamp station shares the setting and what is waiting\n nixamp station shares on [--owner-moderation] [--unlisted] [--max-mb 60] [--per-hour 6]\n nixamp station shares off\n nixamp station shares list [--state held|approved|reported|rejected]\n nixamp station shares approve|reject|delete SHARE\n nixamp station shares trust ADDRESS [--remove] believe this proxy's X-Forwarded-For\n\n --json machine-readable output\n --url, --key another server, as with `nixamp admin`\n\nA new station is private and stopped. Starting it does not publish it.";
|
package/dist/station-usage.js
CHANGED
|
@@ -28,7 +28,8 @@ export const USAGE = `nixamp station — make a collection into a station
|
|
|
28
28
|
nixamp station ai remove KEY [--files]
|
|
29
29
|
nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)
|
|
30
30
|
nixamp station ai resume after the provider ran out of credit
|
|
31
|
-
nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,
|
|
31
|
+
nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,
|
|
32
|
+
NIXAMP_OPENAI_URL | NIXAMP_OPENAI_MODEL (an OpenAI-compatible stand-in), from stdin
|
|
32
33
|
|
|
33
34
|
Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):
|
|
34
35
|
nixamp station shares the setting and what is waiting
|
package/dist/stations.js
CHANGED
|
@@ -231,6 +231,8 @@ export class StationStore {
|
|
|
231
231
|
station.bitrate = this.bitrateFrom(input.bitrate);
|
|
232
232
|
if (input.breaksEvery !== undefined)
|
|
233
233
|
station.breaksEvery = this.breaksFrom(input.breaksEvery);
|
|
234
|
+
if (input.video !== undefined)
|
|
235
|
+
station.video = input.video === true;
|
|
234
236
|
if (items !== null) {
|
|
235
237
|
if (items.length === 0)
|
|
236
238
|
throw new StationError("empty_station", "a station needs at least one file that plays");
|
package/package.json
CHANGED
package/src/ai-keys.ts
CHANGED
|
@@ -10,7 +10,11 @@ import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { stateDir } from "./daemon.ts";
|
|
12
12
|
|
|
13
|
-
export const AI_KEY_NAMES = [
|
|
13
|
+
export const AI_KEY_NAMES = [
|
|
14
|
+
"ELEVENLABS_API_KEY", "GEMINI_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY",
|
|
15
|
+
// Any OpenAI-compatible endpoint in OpenAI's place (Cloudflare Workers AI, Ollama, ...) and its model.
|
|
16
|
+
"NIXAMP_OPENAI_URL", "NIXAMP_OPENAI_MODEL",
|
|
17
|
+
] as const;
|
|
14
18
|
export type AiKeyName = (typeof AI_KEY_NAMES)[number];
|
|
15
19
|
|
|
16
20
|
export function aiKeysFile(): string {
|
package/src/ai-routes.ts
CHANGED
|
@@ -127,7 +127,8 @@ export async function handleAiRoutes(
|
|
|
127
127
|
return true;
|
|
128
128
|
}
|
|
129
129
|
if (method === "POST") {
|
|
130
|
-
|
|
130
|
+
shares.configure(await jsonBody(ctx, request));
|
|
131
|
+
ctx.json(response, 200, { setting: shares.setting() });
|
|
131
132
|
return true;
|
|
132
133
|
}
|
|
133
134
|
}
|
package/src/ai-text.ts
CHANGED
|
@@ -59,15 +59,18 @@ export function hasModel(env: Record<string, string | undefined> = process.env):
|
|
|
59
59
|
export async function askJson(options: AskOptions): Promise<Answer> {
|
|
60
60
|
const env = options.env ?? process.env;
|
|
61
61
|
const send = options.fetcher ?? fetch;
|
|
62
|
-
const signal = AbortSignal.timeout(options.timeoutMs ?? 30_000);
|
|
63
62
|
const gemini = aiKey("GEMINI_API_KEY", env);
|
|
64
63
|
const openai = aiKey("OPENAI_API_KEY", env);
|
|
65
64
|
const anthropic = aiKey("ANTHROPIC_API_KEY", env);
|
|
66
|
-
|
|
65
|
+
// Each model with a key, in turn: one that refuses this server (Gemini
|
|
66
|
+
// answers 400 "User location is not supported" from some networks) or is
|
|
67
|
+
// down is not a reason to go without when another can answer.
|
|
68
|
+
const tries: Array<() => Promise<Answer>> = [];
|
|
69
|
+
if (gemini) tries.push(async () => {
|
|
67
70
|
const model = env["NIXAMP_GEMINI_MODEL"] || "gemini-flash-latest";
|
|
68
71
|
const response = await send(`https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent`, {
|
|
69
72
|
method: "POST",
|
|
70
|
-
signal,
|
|
73
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
71
74
|
headers: { "content-type": "application/json", "x-goog-api-key": gemini },
|
|
72
75
|
body: JSON.stringify({
|
|
73
76
|
systemInstruction: { parts: [{ text: options.system }] },
|
|
@@ -75,32 +78,40 @@ export async function askJson(options: AskOptions): Promise<Answer> {
|
|
|
75
78
|
generationConfig: { responseMimeType: "application/json", temperature: 0.9 },
|
|
76
79
|
}),
|
|
77
80
|
});
|
|
78
|
-
if (!response.ok)
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
const said = (await response.json().catch(() => ({}))) as { error?: { message?: string } };
|
|
83
|
+
throw new Error(`gemini answered HTTP ${response.status}${said.error?.message ? `: ${said.error.message}` : ""}`);
|
|
84
|
+
}
|
|
79
85
|
const body = (await response.json()) as { candidates?: Array<{ content?: { parts?: Array<{ text?: string }> } }> };
|
|
80
86
|
const text = body.candidates?.[0]?.content?.parts?.map((one) => one.text ?? "").join("") ?? "";
|
|
81
87
|
return { model, value: firstObject(text) };
|
|
82
|
-
}
|
|
83
|
-
if (openai) {
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
});
|
|
89
|
+
if (openai) tries.push(async () => {
|
|
90
|
+
// OpenAI, or anything that speaks its chat completions (Cloudflare
|
|
91
|
+
// Workers AI's /ai/v1, Ollama's /v1): NIXAMP_OPENAI_URL is that base.
|
|
92
|
+
const baseUrl = (aiKey("NIXAMP_OPENAI_URL", env) || "https://api.openai.com/v1").replace(/\/+$/, "");
|
|
93
|
+
const official = new URL(baseUrl).host === "api.openai.com";
|
|
94
|
+
const model = aiKey("NIXAMP_OPENAI_MODEL", env) || "gpt-4.1-mini";
|
|
95
|
+
const response = await send(`${baseUrl}/chat/completions`, {
|
|
86
96
|
method: "POST",
|
|
87
|
-
signal,
|
|
97
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
88
98
|
headers: { "content-type": "application/json", authorization: `Bearer ${openai}` },
|
|
89
99
|
body: JSON.stringify({
|
|
90
100
|
model,
|
|
91
|
-
|
|
101
|
+
// Not every compatible server knows json_object; the answer is read for its JSON either way.
|
|
102
|
+
...(official ? { response_format: { type: "json_object" } } : {}),
|
|
92
103
|
messages: [{ role: "system", content: options.system }, { role: "user", content: options.prompt }],
|
|
93
104
|
}),
|
|
94
105
|
});
|
|
95
|
-
if (!response.ok) throw new Error(
|
|
106
|
+
if (!response.ok) throw new Error(`${official ? "openai" : new URL(baseUrl).host} answered HTTP ${response.status}`);
|
|
96
107
|
const body = (await response.json()) as { choices?: Array<{ message?: { content?: string } }> };
|
|
97
108
|
return { model, value: firstObject(body.choices?.[0]?.message?.content ?? "") };
|
|
98
|
-
}
|
|
99
|
-
if (anthropic) {
|
|
109
|
+
});
|
|
110
|
+
if (anthropic) tries.push(async () => {
|
|
100
111
|
const model = env["NIXAMP_ANTHROPIC_MODEL"] || "claude-haiku-5-5";
|
|
101
112
|
const response = await send("https://api.anthropic.com/v1/messages", {
|
|
102
113
|
method: "POST",
|
|
103
|
-
signal,
|
|
114
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
104
115
|
headers: { "content-type": "application/json", "x-api-key": anthropic, "anthropic-version": "2023-06-01" },
|
|
105
116
|
body: JSON.stringify({
|
|
106
117
|
model,
|
|
@@ -112,6 +123,15 @@ export async function askJson(options: AskOptions): Promise<Answer> {
|
|
|
112
123
|
if (!response.ok) throw new Error(`anthropic answered HTTP ${response.status}`);
|
|
113
124
|
const body = (await response.json()) as { content?: Array<{ type: string; text?: string }> };
|
|
114
125
|
return { model, value: firstObject(body.content?.filter((one) => one.type === "text").map((one) => one.text ?? "").join("") ?? "") };
|
|
126
|
+
});
|
|
127
|
+
if (tries.length === 0) throw new NoModel();
|
|
128
|
+
const failures: string[] = [];
|
|
129
|
+
for (const attempt of tries) {
|
|
130
|
+
try {
|
|
131
|
+
return await attempt();
|
|
132
|
+
} catch (error) {
|
|
133
|
+
failures.push((error as Error).message);
|
|
134
|
+
}
|
|
115
135
|
}
|
|
116
|
-
throw new
|
|
136
|
+
throw new Error(failures.join("; "));
|
|
117
137
|
}
|
package/src/server.ts
CHANGED
|
@@ -2861,6 +2861,7 @@ export function createHandler(engine: Engine, options: HandlerOptions) {
|
|
|
2861
2861
|
return selectStationFiles(engine, body);
|
|
2862
2862
|
},
|
|
2863
2863
|
trackFor: (file) => trackFor(engine, file),
|
|
2864
|
+
...(options.library ? { isVideo: (file: string) => options.library!.index.itemAt(file)?.video === true } : {}),
|
|
2864
2865
|
base: `${scheme}://${request.headers.host ?? "localhost"}`,
|
|
2865
2866
|
publicBase: options.stations.publicBase?.() ?? "",
|
|
2866
2867
|
json,
|
package/src/station-cli.ts
CHANGED
|
@@ -271,7 +271,7 @@ async function aiCommand(argv: string[], call: Call, show: Show, json: boolean):
|
|
|
271
271
|
const describe = (one: Record<string, unknown>): string => [
|
|
272
272
|
`${String(one["name"])} [${String(one["key"])}]${one["enabled"] ? "" : " (off)"}`,
|
|
273
273
|
` style ${String(one["style"])}`,
|
|
274
|
-
` tracks ${
|
|
274
|
+
` tracks ${Array.isArray(one["tracks"]) ? one["tracks"].length : Number(one["tracks"] ?? 0)} of ${String(one["trackSeconds"])} s, ${String(one["perDay"])} a day${one["vocals"] ? ", with vocals" : ""}`,
|
|
275
275
|
` station ${one["stationId"] ? String(one["stationId"]) : "made with its first track"}${one["publish"] ? ", public on the guide" : ", unlisted"}`,
|
|
276
276
|
...(one["lastError"] ? [` problem ${String(one["lastError"])}`] : []),
|
|
277
277
|
].join("\n");
|
|
@@ -325,7 +325,7 @@ async function aiCommand(argv: string[], call: Call, show: Show, json: boolean):
|
|
|
325
325
|
...(has(argv, "--off") ? { enabled: false } : has(argv, "--on") ? { enabled: true } : {}),
|
|
326
326
|
...(has(argv, "--vocals") ? { vocals: true } : has(argv, "--instrumental") ? { vocals: false } : {}),
|
|
327
327
|
};
|
|
328
|
-
return show(await call("PATCH", `/api/v1/stations/ai/stations/${key}`, body), (answer) => describe(
|
|
328
|
+
return show(await call("PATCH", `/api/v1/stations/ai/stations/${key}`, body), (answer) => describe(answer["station"] as Record<string, unknown>));
|
|
329
329
|
}
|
|
330
330
|
case "remove": {
|
|
331
331
|
if (!key) { console.error("nixamp station ai remove needs the AI station's key"); return 2; }
|
package/src/station-routes.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface StationContext {
|
|
|
40
40
|
select: (body: { items?: unknown; folder?: unknown }) => string[] | null;
|
|
41
41
|
/** What the library knows about a file, for now playing. */
|
|
42
42
|
trackFor: (file: string) => { title: string; artist: string; album: string } | null;
|
|
43
|
+
/** Whether the library knows this file as moving picture; absent in tests that do not care. */
|
|
44
|
+
isVideo?: (file: string) => boolean;
|
|
43
45
|
/** This server's address as the asker reached it, for links. */
|
|
44
46
|
base: string;
|
|
45
47
|
/**
|
|
@@ -92,6 +94,9 @@ export function publicView(ctx: StationContext, station: Station): PublicStation
|
|
|
92
94
|
const file = state === "live" || state === "recovering" ? nowPlayingFile(ctx, station) : "";
|
|
93
95
|
// The tags the player read when it put this file on, else the library's.
|
|
94
96
|
const track = file ? (ctx.channels.tagsOf(channelOf(station.id), file) ?? ctx.trackFor(file)) : null;
|
|
97
|
+
// What the channel is carrying wins over the flag: a station made by hand
|
|
98
|
+
// from films streams video whether or not anyone said so.
|
|
99
|
+
const video = station.video || ctx.channels.kindOf(channelOf(station.id)) === "video";
|
|
95
100
|
return {
|
|
96
101
|
id: station.id,
|
|
97
102
|
name: station.name,
|
|
@@ -100,8 +105,8 @@ export function publicView(ctx: StationContext, station: Station): PublicStation
|
|
|
100
105
|
state,
|
|
101
106
|
// Tags, or nothing: a bare file name is the owner's, not the public's.
|
|
102
107
|
nowPlaying: track && (track.title || track.artist) ? track : null,
|
|
103
|
-
kind:
|
|
104
|
-
format: state === "stopped" || state === "offline" ? null :
|
|
108
|
+
kind: video ? "video" : "audio",
|
|
109
|
+
format: state === "stopped" || state === "offline" ? null : video
|
|
105
110
|
? { codec: "h264+aac", bitrateKbps: station.bitrate, sampleRate: 48_000, channels: 2 }
|
|
106
111
|
: { codec: "mp3", bitrateKbps: station.bitrate, sampleRate: 48_000, channels: 2 },
|
|
107
112
|
listeners: ctx.runner.listeners(station.id),
|
|
@@ -342,6 +347,10 @@ export async function handleStations(
|
|
|
342
347
|
}
|
|
343
348
|
const items = ctx.select(input);
|
|
344
349
|
if (items === null) throw new StationError("items_required", "choose files by track index (items) or a folder");
|
|
350
|
+
// Unsaid, a station is TV when most of its files are.
|
|
351
|
+
if (input["video"] === undefined && ctx.isVideo) {
|
|
352
|
+
input["video"] = items.filter((file) => ctx.isVideo!(file)).length * 2 > items.length;
|
|
353
|
+
}
|
|
345
354
|
const station = ctx.store.create(input, items, ctx.account, Date.now(), key);
|
|
346
355
|
ctx.json(response, 201, { station: ownerView(ctx, station), created: true });
|
|
347
356
|
return true;
|
package/src/station-usage.ts
CHANGED
|
@@ -28,7 +28,8 @@ export const USAGE = `nixamp station — make a collection into a station
|
|
|
28
28
|
nixamp station ai remove KEY [--files]
|
|
29
29
|
nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)
|
|
30
30
|
nixamp station ai resume after the provider ran out of credit
|
|
31
|
-
nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,
|
|
31
|
+
nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,
|
|
32
|
+
NIXAMP_OPENAI_URL | NIXAMP_OPENAI_MODEL (an OpenAI-compatible stand-in), from stdin
|
|
32
33
|
|
|
33
34
|
Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):
|
|
34
35
|
nixamp station shares the setting and what is waiting
|
package/src/stations.ts
CHANGED
|
@@ -284,6 +284,7 @@ export class StationStore {
|
|
|
284
284
|
if (input.repeat !== undefined) station.repeat = input.repeat !== false;
|
|
285
285
|
if (input.bitrate !== undefined) station.bitrate = this.bitrateFrom(input.bitrate);
|
|
286
286
|
if (input.breaksEvery !== undefined) station.breaksEvery = this.breaksFrom(input.breaksEvery);
|
|
287
|
+
if (input.video !== undefined) station.video = input.video === true;
|
|
287
288
|
if (items !== null) {
|
|
288
289
|
if (items.length === 0) throw new StationError("empty_station", "a station needs at least one file that plays");
|
|
289
290
|
if (items.length > MAX_ITEMS) throw new StationError("too_many_items", `a station holds at most ${MAX_ITEMS} files`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./main-
|
|
1
|
+
import{n as e}from"./main-D0g9H121.js";var t={...e,"No parties live right now.":`لا توجد جلسات مباشرة الآن.`,"Could not refresh parties.":`تعذر تحديث الجلسات.`,"Pick a server in the directory, or paste its link here.":`اختر خادمًا من الدليل أو الصق رابطه هنا.`,"Interface language":`لغة الواجهة`,Language:`اللغة`,"Translation language":`لغة الترجمة`,"Original (auto-detect)":`الأصل (اكتشاف تلقائي)`,Play:`تشغيل`,Pause:`إيقاف مؤقت`,Stop:`إيقاف`,Next:`التالي`,Previous:`السابق`,Select:`اختيار`,"Next/Prev":`التالي/السابق`,Quit:`خروج`,"Now Playing":`قيد التشغيل`,"Spectrum Analyser":`محلل الطيف`,Playlist:`قائمة التشغيل`,Files:`الملفات`,"Open files":`فتح ملفات`,"Open folder":`فتح مجلد`,"Add to library":`إضافة إلى المكتبة`,"Replace playlist":`استبدال قائمة التشغيل`,Filter:`تصفية`,Search:`بحث`,"Nothing loaded.":`لم يُحمّل أي محتوى.`,"Empty.":`فارغ.`,"Loading…":`جارٍ التحميل…`,"Connecting…":`جارٍ الاتصال…`,Connected:`متصل`,"Not connected":`غير متصل`,"No source":`لا يوجد مصدر`,Playing:`يعمل`,Stopped:`متوقف`,Volume:`مستوى الصوت`,Seek:`موضع التشغيل`,"Full screen":`ملء الشاشة`,Download:`تنزيل`,Share:`مشاركة`,Copy:`نسخ`,"Copy link":`نسخ الرابط`,Copied:`تم النسخ`,Save:`حفظ`,Cancel:`إلغاء`,Close:`إغلاق`,Remove:`إزالة`,Delete:`حذف`,Edit:`تعديل`,Add:`إضافة`,Send:`إرسال`,Retry:`إعادة المحاولة`,Back:`رجوع`,"Next page":`الصفحة التالية`,"Previous page":`الصفحة السابقة`,"Show more":`عرض المزيد`,Panels:`اللوحات`,"Reset layout":`إعادة ضبط التخطيط`,Show:`إظهار`,Hide:`إخفاء`,Collapse:`طي`,Expand:`توسيع`,"Move up":`نقل لأعلى`,"Move down":`نقل لأسفل`,Install:`تثبيت`,"TV mode":`وضع التلفاز`,On:`مفعّل`,Off:`معطّل`,Account:`الحساب`,"Sign in":`تسجيل الدخول`,"Sign out":`تسجيل الخروج`,"Create account":`إنشاء حساب`,Email:`البريد الإلكتروني`,Password:`كلمة المرور`,"Forgot password?":`نسيت كلمة المرور؟`,"Welcome back":`مرحبًا بعودتك`,Profile:`الملف الشخصي`,Handle:`اسم المستخدم`,"Your servers":`خوادمك`,Server:`الخادم`,Connect:`اتصال`,Disconnect:`قطع الاتصال`,Directory:`الدليل`,Favourites:`المفضلة`,Follow:`متابعة`,Unfollow:`إلغاء المتابعة`,Notifications:`الإشعارات`,"Phone number":`رقم الهاتف`,"Save number":`حفظ الرقم`,Transcript:`النص المفرغ`,Captions:`الترجمة النصية`,"Translate audio":`ترجمة الصوت`,"Audio language":`لغة الصوت`,"Audio options":`خيارات الصوت`,"Keep background sound":`الاحتفاظ بأصوات الخلفية`,"Background level":`مستوى صوت الخلفية`,"Speaker voices":`أصوات المتحدثين`,"Any voice":`أي صوت`,"Male voice":`صوت رجالي`,"Female voice":`صوت نسائي`,"Original audio.":`الصوت الأصلي.`,"Buy translated audio":`شراء الصوت المترجم`,"Audio credit":`رصيد الصوت`,"Buy pass":`شراء تصريح`,Pass:`تصريح`,"Pay with":`الدفع باستخدام`,"Check payment":`التحقق من الدفع`,"Open checkout":`الانتقال للدفع`,"Free sessions":`جلسات مجانية`,"Usage rates and expiry":`الأسعار ومدة الصلاحية`,Catalogs:`الكتالوجات`,"Add catalog":`إضافة كتالوج`,"Catalog name":`اسم الكتالوج`,Link:`الرابط`,"Play link":`تشغيل الرابط`,"Go live":`بدء بث مباشر`,Publish:`نشر`,Listen:`استماع`,"Live now":`مباشر الآن`,Upcoming:`قريبًا`,Parties:`حفلات المشاهدة`,"Join party":`الانضمام للحفلة`,"Invite code":`رمز الدعوة`,Invite:`دعوة`,Chat:`الدردشة`,"Chat message":`رسالة دردشة`,People:`الأشخاص`,Speaker:`متحدث`,Speakers:`المتحدثون`,Listener:`مستمع`,Moderator:`مشرف`,"Raise hand":`رفع اليد`,"Hand raises":`الأيدي المرفوعة`,Questions:`الأسئلة`,Resources:`الموارد`,Replay:`إعادة العرض`,Schedule:`الجدول`,Event:`الفعالية`,Host:`المضيف`,About:`حول`,Stage:`المنصة`,Title:`العنوان`,Description:`الوصف`,Topic:`الموضوع`,Public:`عام`,"Anyone with the link":`أي شخص لديه الرابط`,"Invited people":`الأشخاص المدعوون`,"Who can join":`من يمكنه الانضمام`,"Date and time":`التاريخ والوقت`,"Expected length":`المدة المتوقعة`,Repeat:`تكرار`,"Does not repeat":`لا يتكرر`,"Every day":`كل يوم`,"Every week":`كل أسبوع`,Homepage:`الموقع الإلكتروني`,"Host name":`اسم المضيف`,"Profile photo URL":`رابط صورة الملف الشخصي`,"Broadcast link":`رابط البث`,"Edit event":`تعديل الفعالية`,"Save changes":`حفظ التغييرات`,"Create live":`إنشاء بث مباشر`,"Schedule class":`جدولة درس`,"Start class":`بدء الدرس`,"End event":`إنهاء الفعالية`,"End session":`إنهاء الجلسة`,"Session ended":`انتهت الجلسة`,"Event ended":`انتهت الفعالية`,Cancelled:`ملغاة`,"Replay available":`إعادة العرض متاحة`,Join:`انضمام`,"Create invite":`إنشاء دعوة`,"Invite as":`الدعوة بصفة`,"Watch now":`شاهد الآن`,"Start a room":`إنشاء غرفة`,"Recent replays":`إعادات العرض الأخيرة`,"Your account":`حسابك`,"Write with AI":`الكتابة بالذكاء الاصطناعي`,"Suggested title":`العنوان المقترح`,"Suggested description":`الوصف المقترح`,"Suggested topic":`الموضوع المقترح`,"Use these details":`استخدام هذه التفاصيل`,"Learn something live.":`تعلّم شيئًا مباشرة.`,"Screen share":`مشاركة الشاشة`,"Upload and broadcast":`رفع وبث`,Help:`مساعدة`,"Reload Player":`إعادة تحميل المشغل`,"Copy Bundled CLI Path":`نسخ مسار أداة سطر الأوامر المضمنة`,"Developer tools":`أدوات المطور`,Undo:`تراجع`,Redo:`إعادة`,Cut:`قص`,Paste:`لصق`,"Select all":`تحديد الكل`,Status:`الحالة`,"Activity log":`سجل النشاط`,Admin:`الإدارة`,"Playback controls":`عناصر التحكم بالتشغيل`,"Tracks and folders":`المقاطع والمجلدات`,"Original-language captions.":`ترجمة نصية باللغة الأصلية.`,"Skip to playback controls":`الانتقال إلى عناصر التحكم بالتشغيل`,"Skip to playlist":`الانتقال إلى قائمة التشغيل`,"Skip to transcript and translated audio":`الانتقال إلى النص المفرغ والصوت المترجم`};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./main-
|
|
1
|
+
import{n as e}from"./main-D0g9H121.js";var t={...e,"No parties live right now.":`Právě neprobíhají žádné párty.`,"Could not refresh parties.":`Párty se nepodařilo aktualizovat.`,"Pick a server in the directory, or paste its link here.":`Vyberte server v seznamu nebo sem vložte jeho odkaz.`,"Interface language":`Jazyk rozhraní`,Language:`Jazyk`,"Translation language":`Jazyk překladu`,"Original (auto-detect)":`Původní (automatické rozpoznání)`,Play:`Přehrát`,Pause:`Pozastavit`,Stop:`Zastavit`,Next:`Další`,Previous:`Předchozí`,Select:`Vybrat`,"Next/Prev":`Další/Předchozí`,Quit:`Ukončit`,"Now Playing":`Právě hraje`,"Spectrum Analyser":`Spektrální analyzátor`,Playlist:`Seznam skladeb`,Files:`Soubory`,"Open files":`Otevřít soubory`,"Open folder":`Otevřít složku`,"Add to library":`Přidat do knihovny`,"Replace playlist":`Nahradit seznam`,Filter:`Filtrovat`,Search:`Hledat`,"Nothing loaded.":`Nic není načteno.`,"Empty.":`Prázdné.`,"Loading…":`Načítání…`,"Connecting…":`Připojování…`,Connected:`Připojeno`,"Not connected":`Nepřipojeno`,"No source":`Žádný zdroj`,Playing:`Přehrávání`,Stopped:`Zastaveno`,Volume:`Hlasitost`,Seek:`Pozice přehrávání`,"Full screen":`Celá obrazovka`,Download:`Stáhnout`,Share:`Sdílet`,Copy:`Kopírovat`,"Copy link":`Kopírovat odkaz`,Copied:`Zkopírováno`,Save:`Uložit`,Cancel:`Zrušit`,Close:`Zavřít`,Remove:`Odebrat`,Delete:`Smazat`,Edit:`Upravit`,Add:`Přidat`,Send:`Odeslat`,Retry:`Zkusit znovu`,Back:`Zpět`,"Next page":`Další stránka`,"Previous page":`Předchozí stránka`,"Show more":`Zobrazit více`,Panels:`Panely`,"Reset layout":`Obnovit rozložení`,Show:`Zobrazit`,Hide:`Skrýt`,Collapse:`Sbalit`,Expand:`Rozbalit`,"Move up":`Nahoru`,"Move down":`Dolů`,Install:`Nainstalovat`,"TV mode":`Režim TV`,On:`Zapnuto`,Off:`Vypnuto`,Account:`Účet`,"Sign in":`Přihlásit se`,"Sign out":`Odhlásit se`,"Create account":`Vytvořit účet`,Email:`E-mail`,Password:`Heslo`,"Forgot password?":`Zapomenuté heslo?`,"Welcome back":`Vítejte zpět`,Profile:`Profil`,Handle:`Uživatelské jméno`,"Your servers":`Vaše servery`,Server:`Server`,Connect:`Připojit`,Disconnect:`Odpojit`,Directory:`Adresář`,Favourites:`Oblíbené`,Follow:`Sledovat`,Unfollow:`Přestat sledovat`,Notifications:`Oznámení`,"Phone number":`Telefonní číslo`,"Save number":`Uložit číslo`,Transcript:`Přepis`,Captions:`Titulky`,"Translate audio":`Překládat zvuk`,"Audio language":`Jazyk zvuku`,"Audio options":`Možnosti zvuku`,"Keep background sound":`Zachovat zvuk na pozadí`,"Background level":`Hlasitost pozadí`,"Speaker voices":`Hlasy mluvčích`,"Any voice":`Libovolný hlas`,"Male voice":`Mužský hlas`,"Female voice":`Ženský hlas`,"Original audio.":`Původní zvuk.`,"Buy translated audio":`Koupit překlad zvuku`,"Audio credit":`Zvukový kredit`,"Buy pass":`Koupit přístup`,Pass:`Přístup`,"Pay with":`Zaplatit pomocí`,"Check payment":`Ověřit platbu`,"Open checkout":`Přejít k platbě`,"Free sessions":`Bezplatné relace`,"Usage rates and expiry":`Ceny a platnost`,Catalogs:`Katalogy`,"Add catalog":`Přidat katalog`,"Catalog name":`Název katalogu`,Link:`Odkaz`,"Play link":`Přehrát odkaz`,"Go live":`Vysílat živě`,Publish:`Zveřejnit`,Listen:`Poslouchat`,"Live now":`Právě živě`,Upcoming:`Připravované`,Parties:`Společná sledování`,"Join party":`Připojit se ke sledování`,"Invite code":`Kód pozvánky`,Invite:`Pozvat`,Chat:`Chat`,"Chat message":`Zpráva chatu`,People:`Lidé`,Speaker:`Mluvčí`,Speakers:`Mluvčí`,Listener:`Posluchač`,Moderator:`Moderátor`,"Raise hand":`Zvednout ruku`,"Hand raises":`Zvednuté ruce`,Questions:`Otázky`,Resources:`Materiály`,Replay:`Záznam`,Schedule:`Rozvrh`,Event:`Událost`,Host:`Pořadatel`,About:`O události`,Stage:`Pódium`,Title:`Název`,Description:`Popis`,Topic:`Téma`,Public:`Veřejné`,"Anyone with the link":`Kdokoli s odkazem`,"Invited people":`Pozvané osoby`,"Who can join":`Kdo se může připojit`,"Date and time":`Datum a čas`,"Expected length":`Očekávaná délka`,Repeat:`Opakovat`,"Does not repeat":`Neopakuje se`,"Every day":`Každý den`,"Every week":`Každý týden`,Homepage:`Webové stránky`,"Host name":`Jméno pořadatele`,"Profile photo URL":`URL profilové fotky`,"Broadcast link":`Odkaz na vysílání`,"Edit event":`Upravit událost`,"Save changes":`Uložit změny`,"Create live":`Vytvořit vysílání`,"Schedule class":`Naplánovat lekci`,"Start class":`Zahájit lekci`,"End event":`Ukončit událost`,"End session":`Ukončit relaci`,"Session ended":`Relace ukončena`,"Event ended":`Událost ukončena`,Cancelled:`Zrušeno`,"Replay available":`Záznam je k dispozici`,Join:`Připojit se`,"Create invite":`Vytvořit pozvánku`,"Invite as":`Pozvat jako`,"Watch now":`Sledovat nyní`,"Start a room":`Vytvořit místnost`,"Recent replays":`Nedávné záznamy`,"Your account":`Váš účet`,"Write with AI":`Psát pomocí AI`,"Suggested title":`Navrhovaný název`,"Suggested description":`Navrhovaný popis`,"Suggested topic":`Navrhované téma`,"Use these details":`Použít tyto údaje`,"Learn something live.":`Učte se naživo.`,"Screen share":`Sdílet obrazovku`,"Upload and broadcast":`Nahrát a vysílat`,Help:`Nápověda`,"Reload Player":`Znovu načíst přehrávač`,"Copy Bundled CLI Path":`Kopírovat cestu k přibalenému CLI`,"Developer tools":`Vývojářské nástroje`,Undo:`Zpět`,Redo:`Znovu`,Cut:`Vyjmout`,Paste:`Vložit`,"Select all":`Vybrat vše`,Status:`Stav`,"Activity log":`Protokol aktivit`,Admin:`Správa`,"Playback controls":`Ovládání přehrávání`,"Tracks and folders":`Skladby a složky`,"Original-language captions.":`Titulky v původním jazyce.`,"Skip to playback controls":`Přejít k ovládání přehrávání`,"Skip to playlist":`Přejít k seznamu skladeb`,"Skip to transcript and translated audio":`Přejít k přepisu a přeloženému zvuku`};export{t as default};
|