mirror of https://github.com/Chocobozzz/PeerTube
Remove verbose option from transcription
Can be specified on-demand using NODE_DEBUG=execa env variablepull/6527/head
parent
b66963fe6f
commit
0b30e58f6f
|
@ -20,7 +20,7 @@ export class Ctranslate2Transcriber extends OpenaiTranscriber {
|
|||
}: TranscribeArgs): Promise<TranscriptFile> {
|
||||
this.assertLanguageDetectionAvailable(language)
|
||||
|
||||
const $$ = $({ verbose: process.env.NODE_ENV !== 'production', env: this.getExecEnv() })
|
||||
const $$ = $({ env: this.getExecEnv() })
|
||||
|
||||
if (model.path) {
|
||||
assert(await lstat(model.path).then(stats => stats.isDirectory()), 'Model path must be a path to a directory.')
|
||||
|
@ -56,7 +56,7 @@ export class Ctranslate2Transcriber extends OpenaiTranscriber {
|
|||
}
|
||||
|
||||
async install (directory: string) {
|
||||
const $$ = $({ verbose: true })
|
||||
const $$ = $({ verbose: 'full' })
|
||||
|
||||
await $$`pip3 install -U -t ${directory} whisper-ctranslate2==${this.engine.version}`
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export class OpenaiTranscriber extends AbstractTranscriber {
|
|||
}: TranscribeArgs): Promise<TranscriptFile> {
|
||||
this.assertLanguageDetectionAvailable(language)
|
||||
|
||||
const $$ = $({ verbose: process.env.NODE_ENV !== 'production', env: this.getExecEnv() })
|
||||
const $$ = $({ env: this.getExecEnv() })
|
||||
const languageArgs = language ? [ '--language', language ] : []
|
||||
|
||||
this.createRun(runId)
|
||||
|
@ -64,7 +64,7 @@ export class OpenaiTranscriber extends AbstractTranscriber {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
async install (directory: string) {
|
||||
const $$ = $({ verbose: true })
|
||||
const $$ = $({ verbose: 'full' })
|
||||
|
||||
await $$`pip3 install -U -t ${[ directory ]} openai-whisper==${this.engine.version}`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue