Showcase: Plugin to record audio directly within Joplin using your system's microphone

This plugin allows you to insert mircophone audio into the current note.
Joplin can't do that in the desktop version yet, so this plugin is meant to fill this gap.

code: GitHub - sigmaSd/joplin-record-plugin: This plugin allows you to record audio directly within Joplin using your system's microphone. The recording is then saved as a resource (attachment) to the current note, and a Markdown link to the recording is inserted.
download: Releases · sigmaSd/joplin-record-plugin · GitHub
demo:

2 Likes

JOPLIN under ANDROID is about to have natively audio record. But it's not the case yet with the JOPLIN Desktop version.
This plugin gives the opportunity to have audio record under JOPLIN Desktop version...

Under WINDOWS 11 & JOPLIN 3.3.4 it works great as far as I can tell.





1 Like

In order to have a reader inside the note, it's necessary to enable the video player in the makdown section (Tools > Options).

image

The bad thing is that the video reader is taking a lot of place for nothing.

Warning :
I use the video reader and not the audio reader because the audio reader doesn't appear when "enable audio reader" is selected.

In fact the audio reader is able to work with .wav files and .mp3 files but not with .webm files...

Nice catch, I can't improve this from the plugin, the changes needs to happen in joplin.
It should recognize audio/webm;codecs=opus as audio format, currently it treats all webm containers as video.

1 Like

The detection of the mime happens here joplin/packages/lib/shim-init-node.ts at 600000a59a8cdeff4fab460e4abb76e73249411e · laurent22/joplin · GitHub

filepaths detection wont give the full story especailly for conainer formats like webm, ideally I can override this detectio by seding mimetype manually for example

        const resource = await joplin.data.post(
          ['resources'],
          null,
          { title: fileName, mime: resourceMimeType }, // Explicitly set mime type
          [{ path: tempFilePath }]
        );
1 Like

Fixed in version 1.3.0 I added a workaround in the plugin

      // HACK: Joplin renders webm as videos, make it think its a wav file instead
      const tempFilePath = path.join(TEMP_DIR, fileName).replace(/.webm$/, ".wav");
1 Like

Thanks. Trying...
A question : if there is a video webm, will Joplin still be able to understand it's a video ? Testing...

Currently Joplin prefers audio/ogg and audio/webm for the audio recording feature in the web app (relevant code). If I recall correctly, this was due to issues with duration information in audio/webm recordings, but this should also show the audio player instead of the video player. Would it make sense to prefer audio/ogg or audio/mp4 to audio/webm?

1 Like

I haven't tested the mobile version, If it renders correctly as audio I guess there is no benefit in changing it

I noticed that I can use .weba instead of .webm code unfortunately joplin doesn't recognize weba so I'll keep the current hack since it gives a better UX

1 Like

Still texting on Windows. The 1.3. of the plugin version is not happy in my system... LOL
The 1.1 and 1.2 were OK.
Something very strange : despite I uninstalled everything (no more plugin in JOPLIN and no more .jpl on my disk where it was) I have all theses lines .


Do you thing there's somethink "still there" in the note despite the markdown shows nothing ? Do you think there's a risk to alterate the notes if we uninstall the plugin after using it ?

That's unexpected, the plugin should not have such capabilities, I have no theory on what's happening in your end other then maybe its a joplin bug revealed by some interaction with the plugin

I tried using other formats so I don't need workarounds but in linux it seems joplin only supports recording in webm or mp4.

I improved the situation a bit in the workaround in version 1.4.0 , now it replaces webm by weba which basicly tells joplin its audio data.

I still have no guesses about the issue you encountered @Steph

1 Like

No problem. Beta tests are fot that ! I try the 1.4 immediatly... If it's OK on Windows, I try Kubuntu...
In fact I think it's not your plugin but something in Joplin with all plugins. At one moment there's something sensible to changes. Because I had the same very long list of lines with the update of the pdf plugin some months ago !

OK : the 1.4 version works fine on windows.


Well done the weba thing...

One thing : is it possible to have again a .webm file extension on disk with a "save as" ?


Same idea with the "open" command : is it possible to run it again properly ?

About the name of the file ("recording" at this moment), do you think it's possible to have somewhere the opportunity to choose it ?
By my side I would prefer something more explicit like "voice-note_[time stamp]"


A last thing. But it's a joplin issue already met with pdf files (not your plugin fault). The copy function of a media file "forget" the link to the data contrary to the [CTRL] [C] way:

[CTRL] [C], move of the insertion point, [CTRL] [V] =>

///

[CTRL] [V] =>

  1. are you having issues with weba ? your media player doesnt run it ? it should be supported, btw you can just rename it to webm and it will work the same
  2. regarding name the file its a good idea I might look into it when I have time
  1. "you can just rename it to webm and it will work the same"
    Yes I did this before to post last time : I confirme that the file is not corrupted. It's just an extension change of name.

  2. I often need to recover on disk (save as) a file put inside a Joplin note. So I'm not really interested to need to rename the extension all the time.

  3. For those who need to use an external media player (open) it's not simple (many steps) by default with the weba extension:





    So yes it can work at the end but I fear that many users give up not understanding why a .webm is not immediatly read.... But I agree it's not that bad : it's just a one time configuration. Except if you want to use differents media players and make a choice every time.

I see, so there are only 2 options

  • use webm and keep the large padding
  • use weba and the user have go through those steps

For the file naming I checked it out, and joplin dialog api doesn't offer a way to send data (in this case the file name ) from the dialog to the main app, there might be a workaround but it will be too complex and I'm not sure if it will work, so for this one I'll leave it to the joplin devs to imporve the api to allow such use case

1 Like

I prefer the second one for obvious reasons of readability.