vocnu 0.4.0 → 0.5.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/README.md CHANGED
@@ -31,6 +31,7 @@ progress and time left, and saves the results next to the file. Options:
31
31
  | `--audio-format m4a\|mp3\|wav\|flac\|ogg` | voice-over audio format |
32
32
  | `--burn-subtitles` | subtitles burned into the picture |
33
33
  | `--original-level <0-100>` | how loud the original sound stays under the voice, in percent (default: 40; 0 silences it, 100 leaves it as it is); between the lines it plays at full volume |
34
+ | `--original-off` | the original sound turned off: the voice-over alone, with silence between its lines (no original voices, music or sound effects) |
34
35
  | `--sdh` | SDH subtitles as well (sounds, speaker names and songs for deaf and hard-of-hearing viewers), one more credit per minute; with `--output subtitles` they may be in the spoken language (`--from de --to de`) |
35
36
  | `--out <dir>` | where the results go |
36
37
  | `--yes` | start without confirming the price |
@@ -95,5 +96,4 @@ trusted publishing, so no npm token or sign-in is needed; it refuses a version n
95
96
 
96
97
  ## License
97
98
 
98
- MIT. The Vocnu service itself has its own [terms](https://vocnu.com/terms); the open source processing engine is
99
- [vocnu/engine](https://github.com/vocnu/engine) (AGPL-3.0).
99
+ MIT. The Vocnu service itself has its own [terms](https://vocnu.com/terms).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vocnu",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Vocnu from your terminal and your AI assistant: AI voice-over and subtitles for your videos (CLI and MCP server).",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -31,6 +31,8 @@ Usage:
31
31
  --audio-format m4a|mp3|wav|flac|ogg
32
32
  --burn-subtitles Subtitles burned into the picture
33
33
  --original-level <0-100> How loud the original stays under the voice, in % (default: 40)
34
+ --original-off Turn the original sound off: the voice-over alone, with silence
35
+ between its lines
34
36
  --sdh SDH subtitles too: sounds, speaker names and songs, for deaf and
35
37
  hard-of-hearing viewers (subtitles may be in the spoken language)
36
38
  --out <directory> Where the results go (default: next to the file)
@@ -158,6 +160,7 @@ async function translate(args, { api, err, out, print }) {
158
160
  from: { type: 'string' },
159
161
  'no-wait': { type: 'boolean' },
160
162
  'original-level': { type: 'string' },
163
+ 'original-off': { type: 'boolean' },
161
164
  out: { type: 'string' },
162
165
  output: { type: 'string' },
163
166
  sdh: { type: 'boolean' },
@@ -175,6 +178,8 @@ async function translate(args, { api, err, out, print }) {
175
178
  const voiceType = ['male', 'female'].includes(voice) ? voice : 'male'
176
179
  // How loud the original stays under the voice, in whole percent; the API's default (40) when not given.
177
180
  const originalLevel = values['original-level']
181
+ // Or none of the original at all, between the lines too (backend ADR 0067).
182
+ const originalOff = values['original-off'] === true
178
183
  if (!OUTPUTS.includes(output)) throw new UsageError(`--output is one of ${OUTPUTS.join(', ')}.`)
179
184
  if (!videoFormats) throw new UsageError(`--format is one or more of ${VIDEO_FORMATS.join(', ')}, separated by commas.`)
180
185
  if (!AUDIO_FORMATS.includes(audioFormat)) throw new UsageError(`--audio-format is one of ${AUDIO_FORMATS.join(', ')}.`)
@@ -183,6 +188,8 @@ async function translate(args, { api, err, out, print }) {
183
188
  throw new UsageError('--original-level is a whole percent from 0 to 100.')
184
189
  }
185
190
  if (originalLevel !== undefined && output === 'subtitles') throw new UsageError('--original-level is for a voice-over; subtitles lower nothing.')
191
+ if (originalOff && output === 'subtitles') throw new UsageError('--original-off is for a voice-over; subtitles have no sound to turn off.')
192
+ if (originalOff && originalLevel !== undefined) throw new UsageError('--original-off leaves no original to set a level for: use one of them.')
186
193
  if (output === 'video' && !isVideo(path)) throw new UsageError('This is an audio file: use --output audio or subtitles.')
187
194
  if (!contentType(path)) throw new UsageError('Vocnu takes video and audio files (MP4, MOV, MKV, WebM, MP3, M4A, WAV...).')
188
195
  if (voice !== voiceType && !(await api.voices(target)).some((candidate) => candidate.id === voice)) {
@@ -219,6 +226,7 @@ async function translate(args, { api, err, out, print }) {
219
226
  voice: voiceType,
220
227
  ...(voice === voiceType ? {} : { voice_id: voice }),
221
228
  ...(originalLevel === undefined ? {} : { original_level: Number(originalLevel) }),
229
+ ...(originalOff ? { original_off: true } : {}),
222
230
  })
223
231
  print(`Started job ${created.job.id} (${created.credit_balance} credits left).`)
224
232
  if (values['no-wait']) return 0
package/src/mcp.js CHANGED
@@ -106,6 +106,9 @@ export function createServer(api, { cwd = process.cwd() } = {}) {
106
106
  original_level: z.number().int().min(0).max(100).optional()
107
107
  .describe('How loud the original sound stays under the voice, in percent: 0 silent, 100 unchanged '
108
108
  + '(default 40). Voice-over only; between the lines the original plays at full volume'),
109
+ original_off: z.boolean().optional()
110
+ .describe('Turn the original sound off: the voice-over alone, with silence between its lines (no original '
111
+ + 'voices, music or sound effects). Voice-over only; original_level is then not used'),
109
112
  output: z.enum(OUTPUTS),
110
113
  sdh: z.boolean().optional()
111
114
  .describe('Also SDH subtitles for deaf and hard-of-hearing viewers: sounds, speaker names and songs'),
@@ -134,7 +137,8 @@ export function createServer(api, { cwd = process.cwd() } = {}) {
134
137
  video_formats: videoFormats,
135
138
  voice: input.voice ?? 'male',
136
139
  ...(input.voice_id ? { voice_id: input.voice_id } : {}),
137
- ...(input.original_level === undefined ? {} : { original_level: input.original_level }),
140
+ ...(input.original_level === undefined || input.original_off ? {} : { original_level: input.original_level }),
141
+ ...(input.original_off ? { original_off: true } : {}),
138
142
  })
139
143
  return { balance_after: created.credit_balance, job_id: created.job.id, status: created.job.status }
140
144
  })