djmango / obsidian-transcription

Obsidian plugin to create high-quality transcriptions from markdown linked audio files
https://swiftink.io
MIT License
156 stars 17 forks source link

Getting error parsing response from Whisper ASR service running locally on Mac #10

Closed hsztul closed 1 year ago

hsztul commented 1 year ago

Running a transcription of a webm audio file, I keep getting the following error: SyntaxError: Unexpected token 'I', "I think th"... is not valid JSON at JSON.parse (<anonymous>) at get json [as json] (app.js:1:710368) at eval (VM239 plugin:obsidian-transcription:91:41)

After inspecting the response from Whisper ASR service (running via Docker on Mac w M2) and the line erroring out, const transcription2 = response.json.text; I noticed response.json doesn't have a text node.

That node that does exist is response.text

I altered this live in the editor, re-ran the transcription in Obsidian file and got the transcription as expected.

Is this expected or there something I have setup wrong, or is this a bug? Thanks in advance, excited to get this working!

djmango commented 1 year ago

Solved in the latest dev build - also now works on any device, - contact me at sulaiman@gambitengine.com or sign up at https://scribe.gambitengine.com/ for early access!