26 lines
514 B
TypeScript
26 lines
514 B
TypeScript
import Bun from 'bun';
|
|
import { parseArgs } from 'node:util';
|
|
|
|
const { values } = parseArgs({
|
|
args: Bun.argv,
|
|
options: {
|
|
workingDir: {
|
|
type: "string"
|
|
},
|
|
tja: {
|
|
type: "string"
|
|
},
|
|
predictScript: {
|
|
type: "string"
|
|
},
|
|
},
|
|
allowPositionals: true,
|
|
});
|
|
|
|
if (!values.tja || !values.workingDir || !values.predictScript) {
|
|
console.error("--workingDir --dataDir --trainDir");
|
|
process.exit(1);
|
|
}
|
|
|
|
const songno = "temp";
|