音声録音プラグイン

デスクトップまたはモバイルのブラウザで直接録音した音声メッセージを投稿できるようにする、シンプルな音声録音プラグインです。

english.best コミュニティフォーラム で実際の動作を確認してください。コードは Github にホストされています。

このライブラリは、RecordRTC と lamejs を特徴とする Microm ライブラリのわずかに修正されたバージョンを使用しています。

標準インストール の後、設定で composer_audio_upload_enabled を有効にしてください。

新しいメッセージを作成する際、マイクアイコンをクリックして録音を開始します。録音が完了すると、クロスブラウザ互換性の向上のため、録音データは mp3 に変換されます。

現在、再エンコードは lamejs を使用して行われており、これは最適ではなく、長い音声メッセージや低速なデバイスでは時間がかかる場合があります。

何らかの理由であなたのデバイスで動作しない場合は、デバイス、ブラウザ、システムバージョンを明記していただければ幸いです。テストは非常に広範ではありませんでしたが、すでにいくつかのユーザーが使用しています。フィードバックやプルリクエストをお待ちしています :slight_smile:

「いいね!」 58

Thank you very much :smiley:

「いいね!」 1

Cool! We regularly get asked for the ability to add a voice message or even a video recording directly to posts. I’ll try this out and let you know how it works out!

Some feedback:

  • mp3, the file type of the uploaded audio recording, is by default not allowed as an upload type. suggest adding a note to the install instructions to enable mp3 uploads.
  • an obvious admin setting to add would be to allow limiting the length of audio recording that can be uploaded. right now it seems that the recording can go on indefinitely though I have not tried it. A max of say 30 seconds or 2 minutes would be suitable for some communities. The utility of an audio recording diminishes the longer it gets, so some default max eg 5 minutes would be sensible.
  • an admin setting to limit by trust level would be helpful
  • a progress indicator during the recording would be helpful, to indicate long the recording is getting, as well as an audio level indicator to show that the audio recording is actually working.
  • the file size of the saved recording is displayed in kilobytes, not megabytes, so eg a 3 minute recording is 2000+. It would be nice to see it in mb.
  • as you indicated, it takes a while to save even a three minute recording, so a progress indicator of the saving process would be helpful.

Is there any scope or ability to add video recording to this plugin? It would be very welcome in my community.

「いいね!」 7

And a quick follow-up after spending a bit of time with this plugin. While looking at

I looked around here but was not able to immediately find posts containing voice recordings (turns out it’s buried in this topic). Some icon (maybe microphone?) indicating topics containing voice recordings might be a good idea, as well as the ability to filter by posts containing voice recordings in the search. Even searching mp3 did not take me straight to posts containing recordings. E.g. a filter to only return topics/posts that “include mp3 recordings”:

Also, just for giggles I recorded a 20 minute recording, then tried to upload it - but the upload failed because it was larger than the maximum size allowed. The recording was then lost, which in this case was no big deal… it was only a recording of me taking a nap, after all. :zzz: But if I had actually spent 20 minutes recording myself saying something important I would have been pretty sad to lose it! So ideally the plugin would stop the recording before the limit is reached, or at least provide a fallback method to save the recording to my device so I can upload it elsewhere and share the link as suggested by the error message.

Update: not sure this is a surprise but this plugin does not work on mobile, using chrome on ios. The record button just doesnt do anything.

Another update: occurs to me the record button could live in the composer options submenu. That would be better in my opinion.

「いいね!」 5

Many thanks for all your feedback, we’ll try to implement some of your suggestions in the next update.

「いいね!」 1

Awesome! I remain very interested in this plugin. Let me know when you need more testing or feedback. :rocket:

「いいね!」 1

Would it possible to allow the recording to be saved somewhere else and then link to that in the plugin.

Example. Say the member had a soundcloud.com account and the recording was sent to soundcloud as a private or public recording.

「いいね!」 7

Intressting project, I really like it.

How about background recording in cases, to allow parallel note taking? This would be my killer feature :wink: Do you know the iOS App Notability? This is currently my way to combine notes with recordings. It’s awesome, because Notability is able to highlight all changes made while the voice is keep talking… I guess this might be too much here? :stuck_out_tongue_winking_eye:

「いいね!」 2

I’d also like to support Keith’s idea of saving the recording elsewhere with one addition. Instead of each member needing a soundcloud.com account, I’d like to be able to create an admin soundcloud account so that all recordings are saved to that account. Will simplify things immensely.

「いいね!」 5

Update to this idea: I wonder if there’s a workflow that allows us to SpeakPipe instead! It’s a free voice recorder that generates a URL that can be added to your post. It also doesn’t require people to create an account. At minimum, people could click on the microphone icon and text pops up with a link to and directions on how to use SpeakPipe.

@csmu and @pawel, this may be another topic all together. Should I split this topic?

「いいね!」 2

Is it free? If so then I think having it as an option would be excellent.

Could the recording be stored on Amazon S3?

「いいね!」 1

The recorder feature is free for any individual to use. They have a more robust product that does cost money, take a look for yourself!

There doesn’t seem to be a workflow that makes it happen automatically, though the person who makes the recording can download it and store the file somewhere else.

「いいね!」 3

Speakpipe does not seem to be “free as in freedom” like we get with discourse. My preference would be to avoid third party hosting of content, including these voice recordings.

You can set up your site to host all attachments on amazon s3 is that not a reasonable solution for those who may want to host longer recordings that take up more space?

「いいね!」 3

このプラグインを見つけられてとても嬉しいです。ただ、第三者による録音のホスティングが可能になるまでは、インストールをためらっています。理想的には、セルフホスティングに加えて、Google ドライブ、Dropbox、Vocaroo、またはその他の第三者のサイトと連携できる接続オプションがあればいいのですが、特にストレージ容量が限られているホストされたコミュニティにとっては、第三者によるホスティングが非常に有益でしょう。今後のアップデートを楽しみにしています。また、これを作成してくれた Pawel さんに感謝します。

「いいね!」 2

こんにちは、ジミーさん!ようこそ。このプラグインに関心を持っていただけて嬉しいです。上記にはサードパーティのホスティングに関する議論が少しありますが、私は個人的に、この特定のプラグインにとってはそれが最優先事項でも、関連するものでもないと考えています。

もし十分な数の人々がそれを望むなら、Speakpipe や他のクラウドベースの音声共有サイトと連携する別のプラグインに取り組むこともできるかもしれません。

このプラグインについては、優先順位は録音の長さを制限する管理者設定を追加することだと考えます。そうすれば、ファイルサイズが保存や再生に過度な負担をかけず、誰も聴かない長い脱線した録音でサイトが散らかることもありません。:wink:

一方、添付ファイルを外部でホストする機能は既に存在します(これは Discourse に組み込まれています。enable s3 uploads 管理者設定を参照してください)。ただし、ストリーミングコンテンツには適していません。

「いいね!」 2

なぜですか?気になります。

「いいね!」 1

Discourse でホストされた動画のストリーミングに関する制限について、ここで会話を見たことがありますが、すぐにそれらを見つけることができませんでした。:wink: 私が少し探している間に、誰かが回答を提供してくれるかもしれません。

私の直感では、ファイルサイズが小さい場合は問題ありませんが、数時間の映画のようなコンテンツになると、Vimeo や YouTube などのクラウドストリーミングサービスにコンテンツを移動させ、Discourse の投稿内でワンボックス表示を提供して、ユーザーがフォーラムから離れずに視聴できるようにすることをお勧めします。

「いいね!」 1

ここにあるプラグインは音声録音用ではありませんか?

モノラルの MP3 オーディオは、おおむね 10MB 以下になるはずです(44.1kHz/16bit/96kbps のモノラル音声を 10 分録音すると 7.2MB です)。そのため、大きな GIF のような扱いが可能で、オブジェクトストレージ(S3)と CDN を組み合わせて使用することも十分に可能です。

「いいね!」 6

ああ、同じ話ですね。混乱させてしまい申し訳ありません。

第三者による音声録音のホスティングを推奨する人が現れていますが、私が言うには、あなたが挙げた理由から、その点については心配する必要はありません。小さなファイルの保存と再生は問題ありません。

ただし、現在このプラグインでは、録音を開始すると無期限に録音が続いてしまい、長時間話してサーバーが許可するファイルサイズを超えて保存しようすると、保存時に失敗してしまいます。

「いいね!」 4

トビアスがこちらで言及しているように、このプラグインにはいくつかの重要な問題があります(主にモバイル端末での問題と、録音保存中のタイマーやフィードバックの欠如)。

ネイティブな代替アプローチの実現を心から願っています。私のユーザーに音声の録音と共有を可能にする最も簡単な方法は、Clypのようなサービスを利用することです。無料プランで360分の録音が可能で、Discourseに直接リンクを貼り付けることができます(OneBoxの魔法のおかげです)。

https://clyp.it/ry03mt3o

唯一の欠点は、iPadでは録音ができない点です(音声ファイルのアップロードのみ可能です)。

もし参考になれば、オンラインで録音できる他のオプションもご紹介します:

  • Poodll - 欠点:ファイルの保存期間が30日間のみ
  • VirtualSpeech: オンライン音声レコーダー - 欠点:iPadでは動作しません。Androidでは.ogaファイルが生成されますが、Discourseでは自動再生されません(.oggファイルは自動再生されます。これはバグかもしれません)
「いいね!」 2