Skip to content

Commit

Permalink
Adds supports for m4a, wav and flac audio files (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikodin authored Jan 8, 2025
1 parent 4a6bd38 commit 6e33cce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/util/mimeType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -17,6 +20,9 @@ const _mimeTypeToFileExtension: Record<SupportedMimeType, string> = {
'audio/ogg': 'ogg',
'audio/mp4': 'mp4',
'audio/mp3': 'mp3',
'audio/m4a': 'm4a',
'audio/wav': 'wav',
'audio/flac': 'flac',
};

export function pickMimeType(preferred: SupportedMimeType) {
Expand Down

0 comments on commit 6e33cce

Please sign in to comment.