Voice Recorder Component

This is a working theme component based on the existing (broken) voice recording plugin. The functionality is the same.

Please make sure you’ve added mp3 to authorized extensions.

15 Likes

15 secs audio recording using iPad wasn’t too successful. After 10 minutes processing I gave up. Now i have an iPhone next to me and it has been processed 10 sec audio now around 5 minutes.

Processors, load and memory of DigitalOcean droplet are totally fine, though. Without any knowledge what is happening it sounds like there will happend nothing. Not even cancel works.

What do you suggest how I start to dig this? Will a recording device send wav or what it is using to server and the component change it to mp3 there using tools of server? If so perhaps I’m missing some tools.

I’m using S3, will that be a problem?

Edit:

It is an issue of iPad/iPhone. Using Windows-laptop everything worked just fine.

Same was bothering all recording plugins at Moodle. There must be used some tricks, I really don’t know how, but like using separate recording app and then upload a file… Things can be changed between iOS-version, though.

Is there some CSS tricks to hide downloading/speed?

4 Likes

Android 10 has the same issue. Never convert and upload…

2 Likes

Yes, the existing plugin had the same issues on mobile (when it worked). The only way these issues will be properly addressed is either:

  • perhaps using a different javascript library that uses web workers (if you find one, I can switch it in); or
  • handling file processing on the backend (the “proper” way).

This theme component is just a direct translation of the existing plugin to a theme component, and adding compatibility updates so it works with the latest Discourse. For a more comprehensive solution this would need to be a funded project and it would take a couple of months.

I made this conversion so the existing users of the plugin could enjoy the same functionality the plugin had :slight_smile:

6 Likes

For avoiding unnecessary installs and questions should you tell in the description that component is very limited and works only at PCs?

Option to upload an audiofile to processing instead recording shoud not take weeks job, but on otherhand I don’t code.

Well, it is nice from you to do that work. But from my point if view as a free rider you could use your spare time better than giving respiration aid for dead :wink: Sorry.

2 Likes

I’m curious, why mp3 rather than another sound format like wav or vorbis?

1 Like

Mostly because of size, when wav is huge. Support for vorbis is limited. MP3s are resonable in sizes and every device and browser supports it.

2 Likes

Yet using vorbis would be even more size-efficient. If it could become an option it would be nice :slight_smile:

1 Like

Uploading audio as a file would be even more nicer :upside_down_face:

1 Like
  1. I would like to help Discourse by translating plugins in ptbr.
  2. There are several plugins that I really like and want to translate in ptbr.
  3. As I said earlier, I would like to be a good software developer, one way I thought was to translate plugins in Discourse. I feel that in doing so, I am contributing in some way to Discourse.
  4. As I said earlier, I can send a pull request if you guys want and find it interesting.
  5. I think Discourse is amazing and the people in it are a great community.
  6. I talked about these points of view, as I had commented here on this post: https://meta.discourse.org/t/voice-recording-plugin - But they said the plugin doesn’t work - old post link. They said here would be the most stable version. So here I am - Hope this helps in some way
  7. As far as I know at the moment, .yml files can be translated. This is very interesting if you want to support multiple languages, you may have multiple users who want to use your plugin in a native language. About this, I hope to help in some way

idea

ptbr.yml :
ptbr:
  composer:
    composer_audio_upload_button_title:  "Gravar & enviar arquivo de áudio"
  composer_audio_upload:
    button_text: "Gravar & enviar áudio"
    title: "Gravar & enviar áudio"
  theme_metadata:
    description: "Adicione sua voz nas postagens"
5 Likes

Fantastic! @keegan is setting up a new translation pipeline for Pavilion that will include this Theme Component, and a number of other Discourse plugins. He can fill you in on the details.

5 Likes

This would be an interesting addition along with chat, let me share this with the team we are already discussing it but it may not come immediately though.

6 Likes

@angus

Can I submit the pull request?

  • So, I was waiting for your answer ;D
  • If you allow, please submit the pull request.

Hey @anon40545810,

Glad to hear you would like to contribute through translations! :smiley:

We are moving to using Crowdin for all our official Pavilion plugins.

To submit translations, you will first need a Crowdin account. You can sign up for one here. After creating an account you can submit your translations for the voice recorder component by doing the following:

  1. Visit Pavilion’s Crowdin Profile here.
  2. Select the plugin you would like to translate. In your case, you would select discourse-voice-recorder.
  3. Select the language you would like to translate for. In your case, you would select Portuguese, Brazilian
  4. From here you can click the Translate All button.
  5. Now you can go ahead and translate! :open_book:
    • On the left are the strings you can select to translate.
    • You can enter the translations in the text field in the center and click save once you are complete.

Please feel free to DM me (@keegan) if you have any questions :slight_smile:

7 Likes

Thank you so much for the feedback ;D

3 Likes

@angus @keegan

As promised - ptbr translations completed:

  • Layouts
  • Voice Recorder
  • Custom Wizard
  • Tickets
  • Legal Tools
  • Multilingual
  • Journal
  • Mentionables
  • Ratings
  • Locations

here: Crowdin Enterprise

5 Likes

Thank you! We’ll get those in post haste.

3 Likes

I stumbled on this js library but I’m not sure if it would work or be easy to substitute in:

But I figured I’d document it here in case anyone was interested in trying.

Edit: this one may be even better because it also has an option for video and screen recording. The only challenge may be that it records to wav or ogg, not mp3, but says there may an easy way to convert wav to mp3 with a different library:

2 Likes