@makemidas/cli 0.12.0 → 0.12.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/README.md CHANGED
@@ -36,7 +36,7 @@ makemidas film new "a 15-second social video for our mugs" --style social --max-
36
36
  | `music "<prompt>"` | Generate a song or track (`--lyrics`, `--title`, `--instrumental`, `--duration`) |
37
37
  | `sfx "<prompt>"` | Generate a sound effect (`--loop`, `--bpm`; the model sets the length) |
38
38
  | `speech "<text>"` (alias `voiceover`) | Turn text into a voiceover (`--voice`; `--delivery` on Gemini TTS, `--speed`/`--stability` on ElevenLabs) |
39
- | `transcribe <file\|url\|fileId>` | Upload audio or video, transcribe it and save the transcript (`--format txt\|srt\|vtt\|json`, `--title`); with Nemotron the JSON also times every word (`words: [{ word, start, end, speaker? }]`) |
39
+ | `transcribe <file\|url\|fileId>` | Upload audio or video, transcribe it and save the transcript (`--format txt\|srt\|vtt\|json`, `--title`); the JSON also times every word (`words: [{ word, start, end, speaker? }]`) |
40
40
  | `remove-bg <image>` | Remove the background; saves a transparent WebP |
41
41
  | `upscale <image> [--scale 1\|2\|4\|8]` | Upscale an image (1 sharpens at the same size; default 2) |
42
42
  | `upscale-video <video> [--resolution 1080P\|2K\|4K]` | Upscale an MP4 or MOV clip of up to 60 s (default 2K) |
@@ -126,13 +126,13 @@ command again.
126
126
  ## Captions and cuts on your computer
127
127
 
128
128
  `captions` and `cut` work on a local file with its transcript, and send
129
- nothing to MakeMidas. The transcript is the JSON `transcribe` saves; with
130
- Nemotron (`-m nvidia/nemotron-3.5-transcribe --format json`) every word has
131
- its own time. A Whisper transcript (the default model) has sentence times
132
- only, so word times are estimated.
129
+ nothing to MakeMidas. The transcript is the JSON `transcribe` saves
130
+ (`--format json`), where every word has its own time with either model. A
131
+ Whisper transcript made before 2026-12-05 has sentence times only, so its
132
+ word times are estimated; transcribe it again for exact ones.
133
133
 
134
134
  ```bash
135
- makemidas transcribe talk.mp4 -m nvidia/nemotron-3.5-transcribe --format json # talk.json (paid)
135
+ makemidas transcribe talk.mp4 --format json # talk.json (paid)
136
136
  makemidas cut talk.mp4 --transcript talk.json --list # numbered words
137
137
  makemidas cut talk.mp4 --transcript talk.json --remove 41-58 --fillers --gaps 0.4
138
138
  makemidas captions talk-cut.mp4 --transcript talk-cut.json
package/dist/api.js CHANGED
@@ -417,7 +417,9 @@ export class Api {
417
417
  form.append('file', new Blob([bytes], { type }), opts.name ?? basename(source));
418
418
  const saved = await this.json('/assets', { method: 'POST', form });
419
419
  if (opts.tags?.length) {
420
- saved.asset = await this.json(`/assets/${encodeURIComponent(saved.asset.id)}`, { method: 'PATCH', json: { tags: opts.tags } });
420
+ // PATCH answers { asset }, not the asset itself.
421
+ const patched = await this.json(`/assets/${encodeURIComponent(saved.asset.id)}`, { method: 'PATCH', json: { tags: opts.tags } });
422
+ saved.asset = patched.asset;
421
423
  }
422
424
  return saved;
423
425
  }
package/dist/args.js CHANGED
@@ -301,7 +301,7 @@ export function captionPosition(value) {
301
301
  /** `--transcript` for captions and cut: the JSON transcribe saves. */
302
302
  export function transcriptArg(value, command) {
303
303
  if (!value) {
304
- throw usageError(`\`${command}\` needs the recording's transcript: \`makemidas transcribe <file> -m nvidia/nemotron-3.5-transcribe --format json\` (every word timed), then --transcript <file>.json.`);
304
+ throw usageError(`\`${command}\` needs the recording's transcript: \`makemidas transcribe <file> --format json\` (every word timed), then --transcript <file>.json.`);
305
305
  }
306
306
  return value;
307
307
  }
package/dist/captions.js CHANGED
@@ -153,7 +153,7 @@ export async function captions(g, source, opts) {
153
153
  throw new CliError(`${source} has no picture to put captions on.`, EXIT.USAGE, 'bad_file');
154
154
  }
155
155
  if (t.estimated) {
156
- log('This transcript has no word timings, so each word is timed by guessing within its sentence. For captions that follow the voice exactly, transcribe with Nemotron, which times every word: `makemidas transcribe <file> -m nvidia/nemotron-3.5-transcribe --format json`.');
156
+ log('This transcript has no word timings (an older Whisper transcript), so each word is timed by guessing within its sentence. For captions that follow the voice exactly, transcribe it again, which times every word: `makemidas transcribe <file> --format json`.');
157
157
  }
158
158
  const size = pageSize(media.video.width, media.video.height);
159
159
  const groups = captionGroups(t.words, captionFit(media.video.width, media.video.height, opts.maxWords));
package/dist/cli.js CHANGED
@@ -156,7 +156,7 @@ Audio options:
156
156
  Transcribe and edit options:
157
157
  -m, --model <id> transcribe: default openai/whisper-large-v2
158
158
  --format <f> transcribe: txt (default), srt, vtt or json (json
159
- times every word with Nemotron)
159
+ times every word)
160
160
  --scale <n> upscale: 1 (sharpen), 2 (default), 4 or 8
161
161
  -r, --resolution <r> upscale-video: 1080P, 2K (default) or 4K
162
162
 
package/dist/config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
2
2
  import { homedir } from 'node:os';
3
3
  import { join } from 'node:path';
4
- export const VERSION = '0.12.0';
4
+ export const VERSION = '0.12.2';
5
5
  export const USER_AGENT = `makemidas-cli/${VERSION}`;
6
6
  export const DEFAULT_BASE_URL = 'https://makemidas.com';
7
7
  export function resolveBaseUrl(flag) {
package/dist/cut.js CHANGED
@@ -125,4 +125,4 @@ export async function cut(g, source, opts) {
125
125
  print(file);
126
126
  log(`Transcript of the cut: ${json} (use it with \`makemidas captions\`).`);
127
127
  }
128
- const ESTIMATED = 'This transcript has no word timings, so they are estimated from its segments and a cut may land mid-word. For exact cuts, transcribe with Nemotron, which times every word: `makemidas transcribe <file> -m nvidia/nemotron-3.5-transcribe --format json`.';
128
+ const ESTIMATED = 'This transcript has no word timings (an older Whisper transcript), so they are estimated from its segments and a cut may land mid-word. For exact cuts, transcribe it again, which times every word: `makemidas transcribe <file> --format json`.';
package/dist/words.js CHANGED
@@ -15,11 +15,11 @@ export async function readTranscript(path) {
15
15
  parsed = JSON.parse(await readFile(path, 'utf8'));
16
16
  }
17
17
  catch {
18
- throw new CliError(`Can't read ${path} as a transcript: make one with \`makemidas transcribe <file> -m nvidia/nemotron-3.5-transcribe --format json\`.`, EXIT.USAGE, 'bad_transcript');
18
+ throw new CliError(`Can't read ${path} as a transcript: make one with \`makemidas transcribe <file> --format json\`.`, EXIT.USAGE, 'bad_transcript');
19
19
  }
20
20
  const t = parsed;
21
21
  if (!t || !Array.isArray(t.segments)) {
22
- throw new CliError(`${path} is not a MakeMidas transcript (no segments): make one with \`makemidas transcribe <file> -m nvidia/nemotron-3.5-transcribe --format json\`.`, EXIT.USAGE, 'bad_transcript');
22
+ throw new CliError(`${path} is not a MakeMidas transcript (no segments): make one with \`makemidas transcribe <file> --format json\`.`, EXIT.USAGE, 'bad_transcript');
23
23
  }
24
24
  return t;
25
25
  }
@@ -103,15 +103,37 @@ export function widenShortWords(words) {
103
103
  return { ...word, start: round(word.start - Math.min(room, short)) };
104
104
  });
105
105
  }
106
+ const HYPHEN_PIECE = /^-[\p{L}\p{N}]/u;
107
+ const WORD_END = /[\p{L}\p{N}]$/u;
108
+ /**
109
+ * A piece starting with a hyphen joined to the word before it: Whisper
110
+ * transcripts can split "game-changer" into `game` and `-changer`.
111
+ */
112
+ export function joinHyphenPieces(words) {
113
+ const joined = [];
114
+ for (const word of words) {
115
+ const last = joined.at(-1);
116
+ if (last && HYPHEN_PIECE.test(word.text) && WORD_END.test(last.text)) {
117
+ joined[joined.length - 1] = {
118
+ text: last.text + word.text,
119
+ start: last.start,
120
+ end: Math.max(last.end, word.end),
121
+ };
122
+ continue;
123
+ }
124
+ joined.push(word);
125
+ }
126
+ return joined;
127
+ }
106
128
  /** Every word with its time: the transcript's own, or estimated. */
107
129
  export function timedWords(t) {
108
130
  const last = t.segments.at(-1)?.end ?? 0;
109
131
  const duration = Math.max(t.durationSeconds || 0, last);
110
132
  if (t.words?.length) {
111
133
  return {
112
- words: widenShortWords(t.words
134
+ words: widenShortWords(joinHyphenPieces(t.words
113
135
  .map((w) => ({ text: w.word.trim(), start: w.start, end: w.end }))
114
- .filter((w) => w.text && w.end >= w.start)),
136
+ .filter((w) => w.text && w.end >= w.start))),
115
137
  estimated: false,
116
138
  duration,
117
139
  language: t.language,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makemidas/cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "AI image, video and audio generation CLI for AI agents (Claude Code, Cursor, Codex) and people: Nano Banana, GPT Image, Seedream, Seedance, Kling, Veo, Suno and more, plus talking avatars, HTML templates and short films, through MakeMidas.",
5
5
  "keywords": [
6
6
  "ai-image-generator",