Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cec892563e |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/ai-utils",
|
||||
"version": "0.7.10",
|
||||
"version": "0.7.11",
|
||||
"description": "AI Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -12,7 +12,7 @@ export class Audio {
|
||||
|
||||
constructor(private ai: Ai) {
|
||||
if(ai.options.whisper) {
|
||||
this.whisperModel = ai.options.asr?.endsWith('.bin') ? ai.options.asr : ai.options.asr + '.bin';
|
||||
this.whisperModel = ai.options.asr || 'ggml-base.en.bin';
|
||||
this.downloadAsrModel();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ print(json.dumps(segments))
|
||||
this.downloadAsrModel(opts.model).then(m => {
|
||||
let output = '';
|
||||
const args = [opts.diarization ? '-owts' : '-nt', '-m', m, '-f', file];
|
||||
console.log(<string>this.ai.options.whisper + ' ' + args.join(' '))
|
||||
proc = spawn(<string>this.ai.options.whisper, args, {stdio: ['ignore', 'pipe', 'ignore']});
|
||||
proc.on('error', (err: Error) => reject(err));
|
||||
proc.stdout.on('data', (data: Buffer) => output += data.toString());
|
||||
|
||||
Reference in New Issue
Block a user