إضافة تسجيل الصوت

إضافة بسيطة لتسجيل الصوت تتيح نشر رسائل صوتية مسجلة مباشرة من متصفح سطح المكتب أو الهاتف المحمول.

اطّلع على منتدى مجتمع english.best لمشاهدة الإضافة وهي تعمل. الكود مستضاف على Github.

تستخدم المكتبة نسخة مُعدّلة قليلاً من مكتبة Microm، والتي تعتمد على RecordRTC وlamejs.

بعد التثبيت القياسي، فعّل composer_audio_upload_enabled في الإعدادات.

عند كتابة رسالة جديدة، ما عليك سوى النقر على أيقونة الميكروفون لبدء التسجيل. بعد الانتهاء، سيتم تحويل التسجيل إلى صيغة mp3 لتحسين التوافق بين المتصفحات.

حاليًا، تتم إعادة الترميز باستخدام lamejs، وهو ليس الحل الأمثل وقد يستغرق بعض الوقت لرسائل صوتية طويلة أو على أجهزة أبطأ.

إذا لم تعمل الإضافة على جهازك لسبب ما، فسأكون ممتنًا إذا أشرت إلى نوع الجهاز والمتصفح وإصدار النظام. لم تكن الاختبارات شاملة للغاية، لكن لدينا بعض المستخدمين الذين يستخدمونها بالفعل. أنا أتطلع إلى أي ملاحظات أو طلبات سحب (pull requests) :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 Drive أو Dropbox أو Vocaroo أو أي موقع طرف ثالث آخر، بالإضافة إلى الاستضافة الذاتية. لكن الاستضافة الطرف الثالثة ستكون مفيدة بشكل خاص للمجتمعات المستضافة التي لا تملك مساحة تخزين كبيرة. أتطلع إلى أي تحديثات مستقبلية لهذا التطبيق، وشكرًا لك يا بافل على صنعه!

إعجابَين (2)

مرحبًا جيمي! أهلاً بك. يسعدني أنكَ مهتم أيضًا بهذه الإضافة. هناك بعض النقاش حول الاستضافة من طرف ثالث أعلاه، لكنني أختلف حقًا مع فكرة أنها أولوية عالية أو حتى ذات صلة بهذه الإضافة بالتحديد.

ربما، إذا أراد عدد كافٍ من الأشخاص ذلك، يمكنك العمل على إضافة مختلفة تتكامل مع Speakpipe أو موقع آخر لمشاركة الصوت يعتمد على السحابة؟

بالنسبة لهذه الإضافة، أعتقد أن الأولوية يجب أن تكون إضافة إعداد للمسؤول يحدد طول التسجيلات. بهذه الطريقة لن يكون حجم الملف مرهقًا للتخزين أو التشغيل، ولن يكون الموقع مليئًا بتسجيلات طويلة متشعبة لا يسمعها أحد. :wink:

وفي الوقت نفسه، توجد بالفعل إمكانية لاستضافة المرفقات خارجيًا (وهذا مدمج في Discourse - انظر إعداد المسؤول enable s3 uploads). ولكن في الواقع، لا يناسب ذلك محتوى البث المباشر.

إعجابَين (2)

أنا فضولي، لماذا؟

إعجاب واحد (1)

لقد رأيتُ محادثات هنا حول القيود المفروضة على بث الفيديو وما شابه ذلك المضيف على منصة ديسكورش، لكنني لم أجدها فورًا. :wink: ربما يتمكن شخص آخر من تقديم إجابة بينما أقوم بالبحث قليلاً.

توجّهتي الشخصية هي أن الملفات الصغيرة ليست مشكلة، ولكن عندما تصل إلى ساعات من الأفلام، فإنك تريد نقل محتواك إلى خدمة بث سحابية مثل Vimeo أو YouTube، ثم توفير عرض مُضمّن داخل منشورات ديسكورش للسماح للناس بمشاهدته دون مغادرة المنتدى.

إعجاب واحد (1)

أليس هذا الملحق مخصصًا لتسجيل الصوت؟

يجب أن يكون ملف صوتي بصيغة MP3 أحادي القناة أقل من 10 ميجابايت في الغالب (10 دقائق من الصوت الأحادي بمعدل 44.1 كيلوهرتز/16 بت/96 كيلوبت في الثانية تساوي 7.2 ميجابايت)، لذا سيكون الأمر أشبه بصورة GIF كبيرة، ويمكن بالتأكيد استخدامه بالتزامن مع تخزين الكائنات (S3) بالإضافة إلى شبكة توصيل المحتوى (CDN).

6 إعجابات

آه، نحن نتحدث عن نفس الشيء. آسف على إرباكي.

الناس يأتون ويدعون لاستضافة تسجيلات الصوت من طرف ثالث، وأنا أقول لا، لا نحتاج للقلق بشأن ذلك للسبب الدقيق الذي ذكرته. تخزين وتشغيل ملف صغير ليس مشكلة.

ومع ذلك، يسمح هذا الإضافة حالياً للأشخاص بالبدء في التسجيل وتركه دون تحديد، مما يؤدي إلى الفشل عند الحفظ إذا تحدثوا لفترة طويلة وحاولوا حفظ ملف بحجم أكبر مما يسمح به الخادم.

4 إعجابات

كما ذكر توبياس هنا، فإن هذا الإضافة يعاني من عدد من المشاكل المهمة (خاصةً المشاكل المتعلقة بالأجهزة المحمولة، وغياب المؤقت أو التغذية الراجعة أثناء حفظ التسجيل).

أود جدًا رؤية نهج بديل أصلي. بالنسبة لي، أبسط خيار للسماح لمستخدميي بتسجيل ومشاركة الصوت هو استخدام خدمة مثل Clyp. فهي توفر 360 دقيقة في الخطة المجانية، وتوفر لك رابطًا مباشرًا يمكنك لصقه في Discourse (بفضل سحر OneBox).

https://clyp.it/ry03mt3o

العيب الوحيد هو أنها لا تسجل على جهاز iPad (يمكنك فقط رفع ملف الصوت).

خيارات أخرى للتسجيل عبر الإنترنت في حال فائدة أي شخص منها:

  • Poodll - العيب: لا تحتفظ بالملفات إلا لمدة 30 يومًا.
  • VirtualSpeech: مسجل صوت عبر الإنترنت - العيب: لا يعمل على جهاز iPad. على نظام Android، يمنحك ملفات بصيغة .oga، والتي لا تُشغل تلقائيًا في Discourse (بينما تعمل ملفات .ogg بشكل صحيح. قد يكون هذا خطأً).
إعجابَين (2)