From 6e33cce6fda608ba61a85bfb5ba39ca8cebd6f8f Mon Sep 17 00:00:00 2001 From: Mike A Date: Wed, 8 Jan 2025 17:35:53 -0500 Subject: [PATCH] Adds supports for m4a, wav and flac audio files (#10) --- manifest.json | 2 +- package.json | 2 +- src/index.ts | 2 +- src/util/mimeType.ts | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index ac236e1..f2f08cf 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "scribe", "name": "Scribe", - "version": "1.0.5", + "version": "1.0.6", "minAppVersion": "0.15.0", "description": "Record voice notes, Fill in lost thoughts, Transcribe the audio, Summarize & Visualize the text - All in one clip", "author": "Mike Alicea", diff --git a/package.json b/package.json index b540e1c..8202563 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-scribe-plugin", - "version": "1.0.5", + "version": "1.0.6", "description": "An Obsidian plugin for recording voice notes, transcribing the audio, and summarizing the text - All in one", "main": "build/main.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 3bd2e93..776fb4f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -154,7 +154,7 @@ export default class ScribePlugin extends Plugin { `audio/${audioFile.extension}` as SupportedMimeType, ) ) { - new Notice('Scribe: ⚠️ This file type is not supported'); + new Notice('Scribe: ⚠️ This file type is not supported.'); return; } const baseFileName = createBaseFileName(); diff --git a/src/util/mimeType.ts b/src/util/mimeType.ts index e66ad20..20c79ae 100644 --- a/src/util/mimeType.ts +++ b/src/util/mimeType.ts @@ -7,6 +7,9 @@ const supportedMimeTypes = [ 'audio/ogg', 'audio/mp4', 'audio/mp3', + 'audio/m4a', + 'audio/wav', + 'audio/flac', ] as const; export type SupportedMimeType = (typeof supportedMimeTypes)[number]; @@ -17,6 +20,9 @@ const _mimeTypeToFileExtension: Record = { 'audio/ogg': 'ogg', 'audio/mp4': 'mp4', 'audio/mp3': 'mp3', + 'audio/m4a': 'm4a', + 'audio/wav': 'wav', + 'audio/flac': 'flac', }; export function pickMimeType(preferred: SupportedMimeType) {