diff --git a/README.md b/README.md index 16fb32c..773b83f 100644 --- a/README.md +++ b/README.md @@ -232,3 +232,15 @@ After I have replied to you, you'll be able to subscribe on [Ko-Fi](https://ko-f I will then send you an API key to use, and you'll be able to start generating transcripts! If you are overloading the service, I may ask you to slow down your requests so other people can use the service and get their transcripts quickly. + +## Quick Audio Notes + +Obsidian provides a Core plugin called Audio Recorder which is pretty cool, but it lacks some features. We've expanded on that idea by giving the ability to get transcripts of your audio added directly to the notes. You also have the ability to pause and resume the recording incase you get interupted mid-recording. + +### Usage + +First, you'll need an API Key from [Deepgram AI](https://dpgr.am/obsidian). It does cost money, but it is really affordable. They also give you up to 12,000 minutes of free transcription for free as part of the trial period, depending on which additional options you select. Add that to the Deepgram API Key setting inside the plugin settings once you have it. + +You can then either use the command `Generate quick audio recording with transcription`, or you can click the microphone icon in the side ribbon. This will pop open a modal giving you the options to select for the transcription. (To learn more about each option, visit their respective links in the modal.) After checking the options you want added, you can hit the green microphone button to start the recording. + +When you are done recording, hit the stop button. It will take a few seconds for the transcription to be ready, when it is you can hit the "Save" button and the audio and transcription will get added to your document. diff --git a/src/DGQuickAudioNote.svelte b/src/DGQuickAudioNote.svelte index cb84d6d..a3c3ee0 100644 --- a/src/DGQuickAudioNote.svelte +++ b/src/DGQuickAudioNote.svelte @@ -15,7 +15,7 @@ export let recorder: MediaRecorder | undefined; export let gumStream: MediaStream | undefined; export let extension: any; - export let modal = Modal; + export const modal = Modal; if (MediaRecorder.isTypeSupported("audio/webm;codecs=opus")) { extension = "webm"; } else { diff --git a/src/main.ts b/src/main.ts index dfa066e..b5e7cc3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,11 +34,7 @@ import { getAudioPlayerIdentify, getStartAndEndFromBracketString, } from "./AudioNotes"; -import { - Transcript, - parseTranscript, - TranscriptsCache, -} from "./Transcript"; +import { Transcript, parseTranscript, TranscriptsCache } from "./Transcript"; // Load Font-Awesome stuff import { library } from "@fortawesome/fontawesome-svg-core"; @@ -572,6 +568,23 @@ export default class AutomaticAudioNotes extends Plugin { }, }); + this.addCommand({ + id: "quick-audio-note", + name: "Generate quick audio recording with transcription", + callback: async () => { + if ( + this.settings.DGApiKey === "" || + this.settings.DGApiKey === undefined + ) { + new Notice( + "Please set your Deepgram API key in the settings tab." + ); + } else { + new DGQuickNoteModal(this).open(); + } + }, + }); + // Register the HTML renderer. this.registerMarkdownCodeBlockProcessor(`audio-note`, (src, el, ctx) => this.postprocessor(src, el, ctx)