Skip to content

Commit

Permalink
feat: transcribe with OpenAI's Whisper
Browse files Browse the repository at this point in the history
  • Loading branch information
chhoumann committed Jul 16, 2024
1 parent d60ac84 commit cb7f206
Show file tree
Hide file tree
Showing 14 changed files with 935 additions and 152 deletions.
Binary file added bun.lockb
Binary file not shown.
13 changes: 10 additions & 3 deletions docs/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ This will reload PodNotes.
## Capture Timestamp
This will capture the current timestamp of the currently playing episode.

See [timestamps](/timestamps) for more information on timestamp templates.
See [timestamps](timestamps.md) for more information on timestamp templates.

## Create Podcast Note
This will create a note for the currently playing episode.

See [templates](/templates) for more information on note templates.
See [templates](templates.md) for more information on note templates.

## Copy universal episode link to clipboard
This will copy the universal episode link to the clipboard.
Expand All @@ -46,4 +46,11 @@ Then, it asks pod.link for an episode ID, after which it constructs the universa

Episode links look like this: [https://pod.link/1138055739/episode/1732808e781cc64a30d7feba0467b63a](https://pod.link/1138055739/episode/1732808e781cc64a30d7feba0467b63a).

They can be used to share the episode with others, no matter what podcast app they use.
They can be used to share the episode with others, no matter what podcast app they use.

## Transcribe current episode
This command will transcribe the currently playing episode using OpenAI's Whisper model.

The transcription will be saved in the location specified in the transcript settings.

Note: This feature requires an OpenAI API key to be set in the settings.
26 changes: 26 additions & 0 deletions docs/docs/transcripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Transcripts

PodNotes allows you to create transcripts of podcast episodes using OpenAI's Whisper model.

## Setting Up

Before you can use the transcription feature, you need to set up a few things:

1. **OpenAI API Key**: You need to have an OpenAI API key. You can get one by signing up at [OpenAI's website](https://openai.com/). Once you have the key, enter it in the PodNotes settings under the "Transcript settings" section.

2. **Transcript File Path**: In the settings, you can specify where you want the transcript files to be saved. You can use placeholders like `{{podcast}}` and `{{title}}` in the path.

3. **Transcript Template**: You can also customize how the transcript content is formatted using a template.

## Creating a Transcript

To create a transcript:

1. Start playing the podcast episode you want to transcribe.
2. Use the "Transcribe current episode" command in Obsidian.
3. PodNotes will download the episode (if it hasn't been downloaded already), split it into chunks, and send these chunks to OpenAI for transcription.
4. Once the transcription is complete, a new file will be created at the specified location with the transcribed content.

## Transcript Template

The transcript template works similarly to the [note template](./templates.md#note-template), but with the added `{{template}}` placeholder.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nav:
- Podcasts: podcasts.md
- 'Local files': local_files.md
- "Import & Export": import_export.md
- Transcripts: transcripts.md
- 'Notes':
- Timestamps: timestamps.md
- Templates: templates.md
Expand Down
2 changes: 1 addition & 1 deletion esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ esbuild.build({
],
format: 'cjs',
watch: !prod,
target: 'es2016',
target: 'es2020',
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
Expand Down
Loading

0 comments on commit cb7f206

Please sign in to comment.