Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Speech: the log says which speech model whisper-server starts with, and whether on the processor, so a report of poor transcripts shows if a smaller model was picked (#107)

christianmat490f2d5f6899
diff --git a/app/src/main/asr/server.ts b/app/src/main/asr/server.ts
index 0d48d082..99833fe5 100644
--- a/app/src/main/asr/server.ts
+++ b/app/src/main/asr/server.ts
@@ -130,6 +130,8 @@ export function createWhisperServer(o: Opts) {
const args = ['-m', o.model, '--host', '127.0.0.1', '--port', String(port), '-t', String(o.threads ?? Math.min(4, availableParallelism())), '-bs', '5']
if (o.vadModel) args.push('--vad', '-vm', o.vadModel)
if (cpuOnly) args.push('-ng')
+ // which model goes in the log too: a report of poor transcripts needs to know if a smaller model was picked (#107)
+ console.info('ASR', `whisper-server starts with ${basename(o.model)} on ${cpuOnly ? 'the processor' : 'the graphics card if it can'}`)
const p = spawn(o.binary, args, { stdio: ['ignore', 'ignore', 'pipe'], windowsHide: true })
launches++
child = p
diff --git a/app/test/asrServer.test.ts b/app/test/asrServer.test.ts
index 9ae966c2..01f5f767 100644
--- a/app/test/asrServer.test.ts
+++ b/app/test/asrServer.test.ts
@@ -188,6 +188,14 @@ describe.skipIf(process.platform === 'win32')('whisper server', () => {
} finally { info.mockRestore() }
})
+ it('says in the log which speech model it runs, and where (#107: a report could not tell)', async () => {
+ const info = vi.spyOn(console, 'info').mockImplementation(() => {})
+ try {
+ await make(fakeBinary()).url()
+ expect(info.mock.calls.map((a) => a.join(' ')).some((l) => /^ASR whisper-server starts with \S+\.bin on the graphics card if it can$/.test(l))).toBe(true)
+ } finally { info.mockRestore() }
+ })
+
it('never asks for more threads than the computer has', async () => {
const bin = fakeBinary()
await make(bin).url()