samuraizer 0.0.1
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 +206 -0
- package/dist/checks/ffmpeg.js +9 -0
- package/dist/checks/ffprobe.js +9 -0
- package/dist/checks/ollama.js +12 -0
- package/dist/checks/whisper.js +9 -0
- package/dist/cli/commands/process.js +138 -0
- package/dist/cli/index.js +175 -0
- package/dist/cli/process-command.js +21 -0
- package/dist/config/defaults.js +7 -0
- package/dist/config/init.js +21 -0
- package/dist/config/load.js +57 -0
- package/dist/config/paths.js +20 -0
- package/dist/config/schema.js +12 -0
- package/dist/config/template.js +9 -0
- package/dist/config/types.js +1 -0
- package/dist/dev/run-tool.js +38 -0
- package/dist/dev/runProcessMeeting.js +21 -0
- package/dist/infra/ffmpeg/run-ffmpeg.js +29 -0
- package/dist/infra/ollama/ollama-client.js +42 -0
- package/dist/infra/whisper/run-whisper-cli.js +40 -0
- package/dist/lib/ollama.js +51 -0
- package/dist/lib/run-command.js +8 -0
- package/dist/orchestrators/process-meeting.js +196 -0
- package/dist/pipeline/analysis/action-items/generate.js +117 -0
- package/dist/pipeline/analysis/action-items/types.js +1 -0
- package/dist/pipeline/analysis/decisions/generate.js +101 -0
- package/dist/pipeline/analysis/decisions/types.js +1 -0
- package/dist/pipeline/analysis/summary/generate.js +24 -0
- package/dist/pipeline/analysis/summary/types.js +1 -0
- package/dist/pipeline/audio/normalize.js +11 -0
- package/dist/pipeline/audio/probe.js +37 -0
- package/dist/pipeline/audio/validate-input.js +46 -0
- package/dist/pipeline/output/paths.js +19 -0
- package/dist/pipeline/output/prepare.js +22 -0
- package/dist/pipeline/output/save.js +16 -0
- package/dist/pipeline/report/generate.js +54 -0
- package/dist/pipeline/transcription/transcribe.js +36 -0
- package/dist/pipeline/transcription/types.js +1 -0
- package/dist/shared/tool-definition.js +5 -0
- package/dist/shared/tool-registry.js +12 -0
- package/dist/tools/analysis/action-item-types.js +1 -0
- package/dist/tools/analysis/extract-action-items-tool.js +94 -0
- package/dist/tools/analysis/extract-decisions-tool.js +84 -0
- package/dist/tools/analysis/summarize-transcription-tool.js +44 -0
- package/dist/tools/input/normalize-audio-tool.js +24 -0
- package/dist/tools/transcription/transcribe-audio-tool.js +43 -0
- package/package.json +42 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { transcribeWithWhisper } from "../../pipeline/transcription/transcribe.js";
|
|
4
|
+
const segmentSchema = z.object({
|
|
5
|
+
startSec: z.number(),
|
|
6
|
+
endSec: z.number(),
|
|
7
|
+
text: z.string(),
|
|
8
|
+
});
|
|
9
|
+
const inputSchema = z.object({
|
|
10
|
+
audioPath: z.string().min(1),
|
|
11
|
+
outputDir: z.string().min(1),
|
|
12
|
+
modelPath: z.string().min(1),
|
|
13
|
+
language: z.string().min(1),
|
|
14
|
+
whisperCommand: z.string().min(1),
|
|
15
|
+
});
|
|
16
|
+
const outputSchema = z.object({
|
|
17
|
+
text: z.string(),
|
|
18
|
+
segments: z.array(segmentSchema),
|
|
19
|
+
transcriptPath: z.string().min(1),
|
|
20
|
+
sourceAudioPath: z.string().min(1),
|
|
21
|
+
});
|
|
22
|
+
export const transcribeAudioTool = {
|
|
23
|
+
name: "transcribe_audio",
|
|
24
|
+
description: "Transcribe audio using whisper.cpp",
|
|
25
|
+
inputSchema,
|
|
26
|
+
outputSchema,
|
|
27
|
+
async execute(input) {
|
|
28
|
+
const outputPrefix = path.join(input.outputDir, "transcript");
|
|
29
|
+
const transcript = await transcribeWithWhisper({
|
|
30
|
+
audioPath: input.audioPath,
|
|
31
|
+
outputPrefix,
|
|
32
|
+
modelPath: input.modelPath,
|
|
33
|
+
language: input.language,
|
|
34
|
+
whisperCommand: input.whisperCommand,
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
text: transcript.text,
|
|
38
|
+
segments: transcript.segments,
|
|
39
|
+
transcriptPath: `${outputPrefix}.txt`,
|
|
40
|
+
sourceAudioPath: transcript.sourceAudioPath,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "samuraizer",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"samuraizer": "./dist/cli/index.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "tsx src/cli/index.ts",
|
|
10
|
+
"process": "tsx src/cli/index.ts process",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"prepack": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"cli",
|
|
24
|
+
"transcription",
|
|
25
|
+
"meetings",
|
|
26
|
+
"ollama",
|
|
27
|
+
"whisper",
|
|
28
|
+
"local-first"
|
|
29
|
+
],
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"description": "CLI tool for meeting transcription and summarization",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"commander": "^14.0.3",
|
|
34
|
+
"execa": "^9.6.1",
|
|
35
|
+
"zod": "^4.3.6"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^25.5.0",
|
|
39
|
+
"tsx": "^4.21.0",
|
|
40
|
+
"typescript": "^5.9.3"
|
|
41
|
+
}
|
|
42
|
+
}
|