Voice Recorder Component

Running Firefox on Debian, when I “preview theme” I get the icon, can record audio, and save, and play it. But without the “theme preview”, the icon disappears. Is there a known procedure to make it reappear?

2 Likes

Did you make sure that the theme component is applied to the theme you’re using?

2 Likes

Yes the theme component is applied to all themes.

2 Likes

Do you have any other theme components that might be interfering with it?

2 Likes

This looks really good! I just did a quick test and it works flawlessly. Nice work! I am personally interested in this feature because I have always dreamed of sharing photos on my family forum and letting people react with an audio recording. If it is then also transcribed automatically that would be amazing.

A suggestion for improving the UI that comes to mind is to make it easier to reply with a voice recording, perhaps with a :studio_microphone: on the post menu. Click that to open the audio recording modal. Save it and then the reply is created and saved, containing the audio recording.

I can’t quite put my finger on it and a designer would do better than me here, but the modal UX could be improved in a few ways to make it more fun, dynamic and easy to understand:

  • when you start a recording, have some animation to indicate active recording
  • when you stop recording, change Start recording to Record again. When selected, warn that the existing recording will be deleted.
  • change Upload to Keep recording
  • change cancel to Delete recording

The RodeReporter app on my iphone comes to mind, which has a pretty decent UI.

4 Likes

This sounds like a great feature to me. :+1:

3 Likes

There is no special condition for the button to appear. :thinking:

Assuming it’s attached to your theme, can you check the browser’s console if you see any errors that could explain your issue?

3 Likes

Here @Arkshine, thank you for looking at it. I loaded the page, then opened the console and clicked New Topic to watch the composer: it did not show the mike button. The messages came before any action.

Console messages

Content-Security-Policy warnings 2
Content-Security-Policy: Ignoring “‘report-sample’” within script-src: ‘strict-dynamic’ specified latest
Content-Security-Policy: Ignoring “‘report-sample’” within script-src: ‘strict-dynamic’ specified latest
:information_source: Discourse v3.3.0.beta2-dev — Commits · discourse/discourse · GitHub — Ember v5.5.0 app.js:240:10

2 Likes

@angus

wonder if you have time to add voice-recording in chat … thanks…

3 Likes

I did a quick test to see. It can work.
The recorded audio can be attached and you need to hit enter to send the message.

I’m unsure whether the message should be sent automatically after audio uploading.
What do you think?

6 Likes

Two buttons? Upload and Upload & Send

3 Likes

This is a good idea. Thanks for the suggestion. :+1:

3 Likes

thanks a lot for the efforts @Arkshine,
so exciting, do you have a branch, I could try :slight_smile:

probably, play, and send
I guess, it is a rare case that, some one uploads it, but not sending it … ?
“send” does both uploading and sending.

3 Likes

and it will work on iPhone too, right ?

1 Like

This is quite cool. Are the audio clips kept for a set period of time? As might be hard on space if a lot of traffic/uploads over time.

This closes the gap further with adding a robust chat system.

3 Likes

guess, same as the chat content, the audio clips will be kept for a period of time as defined in the channel setting… could be 1 day to months…

it seems, the system periodically removes media files which are not being ref’ed anymore… my guess, not sure about the logic…

3 Likes

Can you please try the feature/chat-support branch? :slight_smile:
URL: https://github.com/arkshine/discourse-voice-recorder

If all is good, I will PR once I have working tests.

What the feature looks like at the moment:

6 Likes

thanks @Arkshine

just installed this branch, and tried, it works nicely on web and device. will try more and post if issues…

thank you so much for this nice function, so cool !

question:

  • is there a time limit for the recording ? maybe need a setting to avoid abuse ?
6 Likes

Thanks for testing! :+1:

There is currently no time limit, but the attachment size limits you, and there is no warning about it. It would be a great feature to stop the recording if its size exceeds the defined limit because I believe you lose the audio if so.

A new setting to define a time limit could also be made. However, I’m unsure how you translate the final size based on the time limit (yet).

5 Likes

Right, i forgot that,
guess no need a setting for it, could just mention it somewhere in the doc if need to…
thanks Arkshine !

4 Likes