Created
July 13, 2025 18:21
-
-
Save camwest/898ec2ba2354f52564122db872275b80 to your computer and use it in GitHub Desktop.
Smart caching in video-to-transcript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Smart caching in video-to-transcript | |
| // From: https://github.com/camwest/video-to-transcript/blob/main/src/transcriber.ts#L46-L52 | |
| const responseFile = audioPath.replace(/\.[^.]+$/, '.deepgram.json'); | |
| if (!force && existsSync(responseFile)) { | |
| console.log(`✓ Using existing transcription: ${responseFile}`); | |
| try { | |
| const responseText = readFileSync(responseFile, 'utf8'); | |
| const result = JSON.parse(responseText); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment