Experimental project

This is a sandbox project, which contains experimental code for developer use only.

VoIP WebForm Recorder Field

This module is a work-in-progress and is seeking contributions. Do not expect it to work out-of-the-box. Please feel free to help if you like!

Definitions

Drupal VoIP is a framework that brings the power of voice and IP-telephony to Drupal sites. It can be used to build hybrid applications that combine regular touchtone phones, web, SMS, Twitter, IM and other communication tools in a variety of ways.

Webform is the module for making surveys in Drupal. Some good examples could be contests, personalized contact forms, or petitions. Webform is a more suitable solution than creating content types and using CCK or Field module.

VoIP Webform makes a VoipDrupal dialplan script from a standard Drupal Webform, allowing Webform surveys to be taken via the telephone.

Audio Recorderfield is a CCK field that allows users to record audio via a java applet in their web browser. It uses the Nanogona java applet (http://gong.ust.hk/nanogong) which has already been proven to work as a Drupal solution. Other solutions include http://drupal.org/project/AudioRecordingField and possible Flash-based solutions).

Phone Recorderfield is a CCK field that allows users to record audio via a the DrupalVoIP module.

Problem this module solves

The suite of modules above is sufficient to create and deliver a webform survey by telephone. The limitation is that the survey is delivered via a robotic (synthesized) voice. The VoIP Webform Recorder module overcomes this limitation by allowing survey creators to record audio for their survey questions via either a web-based audio recorder or a VoIP Drupal telephone call.

How this module works

There are three methods of adding audio using this module and they are not incompatible:

AudioRecorderField-like implementation

For each Webform component on VoIP webform enabled nodes, the user will be presented with an embedded audio recording field that allows the recording and playback of a single mp3 audio file representing the 'description' of the webform component. When the webform component is saved, the audio is also saved. The audio, an mp3 file, is saved using the Drupal file system. If existing audio is re-recorded, the previous audio files are deleted. This audio recorder will likely mimic the audiorecorderfield module which uses nanogong, a java based audio recording solution which integrates easily with PHP.

PhoneRecorderField-like implementation

This approach will place an obvious link (local task?) on the webform node page called "Record Audio", linking to a page that prompts the user with a telephone number to call and a script of of the questions they have to be recorded. The user either calls or is called by the system, and is then prompted, one question at a time, for recordings of the audio for that question. The user can then review/confirm/re-record each question. On-screen, the instructions would contain the text of each webform component question to assist the user in the recording.

Upload Audio

Finally, if the user has pre-recorded audio (professionally recorded, etc...), we allow them the option to upload it via the webform component edit form. The field could presumably be attached somehow to the AudioRecorderField-like field described above.

The Final Bits
When the VoIP Webform module builds the dialplan script, it will see that there is an audio file available for the field, rather than text that needs to be converted into speech by the call service. This will be handled by a hook that will come from inside of VoIP Webform.

Database specification

This module will add a single table to the database, consisting of four fields:
- vowrid, the primary id and autoincrement field
- nid, the webform's node id
- acid, the webform's component id
- fid, the Drupal file id of the mp3 we're saving

How to get started (or, how the module should work, after it's "working")

  • Install and configure VoIP Webform per its documentation.
  • Install the VoIP Webform Recorder module.
  • Create a webform node, and add a VoIP Webform compatible component.
  • On the component's configuration/edit page, you will be presented with an audio recording field.
  • Click the 'record' button to record audio which will be played for the caller during the poll.
  • Click 'stop' to end the recording.
  • You can review the recording before saving the component by using the 'play' button. If you don't like the recording, you can re-recording it by clicking the 'record' button again.
  • If you are happy with the recording, save the webform component.
  • The audio file will now be played in place of the synthesized audio for the survey component.

How you can help now

Dig into the issue queue and help get this module working, one task at a time! :)

Project information