Add multi-tenant cloud mode: self-serve purchase, credit metering, core-decoupling
Introduces RECAP_MODE=multi alongside single-mode self-host: - Tenant auth + accounts (magic-link via System SMTP), per-tenant credit pool, anonymous trial minting with per-IP/-64 caps - Self-serve Pro/Max purchase: inline Lightning (BTCPay) + card (Zaprite), prepaid 30-day periods, expiry-reminder emails - Core-decoupling: relay owns cloud tier/expiry keyed by Recaps user-id - SQLite (better-sqlite3) schema for multi-mode; filesystem unchanged for single - StartOS actions/versions through 0.2.155
This commit is contained in:
+12
-1
@@ -53,7 +53,18 @@ export async function splitAudioFile(inputPath, outputDir, chunkSeconds = 2700)
|
||||
"-acodec", "copy",
|
||||
chunkPath,
|
||||
], { timeout: 120000 });
|
||||
chunks.push({ path: chunkPath, startOffset: startSec, index: i });
|
||||
chunks.push({
|
||||
path: chunkPath,
|
||||
startOffset: startSec,
|
||||
// Actual seconds in THIS chunk (the last chunk is usually
|
||||
// shorter than chunkSeconds). Carried downstream so the
|
||||
// transcribe-stitching code can sanity-cap timestamps each
|
||||
// chunk's model emits — some models hallucinate offsets
|
||||
// way past the chunk's audio (observed: gemini-3.1-flash-lite
|
||||
// emitting [10:12:44] on a 45-min chunk).
|
||||
durationSec: segLen,
|
||||
index: i,
|
||||
});
|
||||
startSec += chunkSeconds;
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user