Get Started: Hello World

Every language or API needs a Hello World: that simplest-of-applications that lets you see the very most basic elements needed to get something going. Here's ours.

Here's how it works:

  1. In our developer account, before writing any code, we set up a VoiceRecorder application for Hello World. Every application you create needs its own VoiceRecorder.
  2. Hello World first issues a "CreateRecordingList" command to MyVox. This sets up a RecordingList, which is a container for Recordings. We put the key to our VoiceRecorder into the command parameters, so MyVox knows that it's talking to our Hello World app.
  3. Next, Hello World issues a "CreateRecording" command. This sets up a single Recording, which is a container for an audio recording made by a caller. Right now, it's empty - nobody's recorded anything yet! We associate it with the RecordingList, by including that RecordingList's key as a parameter. All Recordings need to be in a RecordingList. Now we're done with our setup.
  4. We've given the user a button to begin the recording process. When it gets pressed, we issue a "StartRecordingSession" command. A RecordingSession is a phone call where one or more recordings will get made. When we issue it, we pass in the key to the Recording we want recorded on that session, so MyVox knows what to do with the recorded audio. MyVox passes back a phone number and a passcode for the user.
  5. We display the number and passcode to the user. He or she calls, enters the code, and is welcomed to the phone system. The phone system then asks her to make her recording. Once this happens, and the user is satisfied enough with the recording to save it, he or she is thanked, and the phone system hangs up.
  6. During this time, we issue periodic "GetSessionStatus" commands to MyVox. These ask MyVox where the user is at in the process of making a recording. We display the results for the user, so he or she can see the connection between the Web interface and the phone system.
  7. Once the recording is saved, GetSessionStatus shows us the URL of the audio file. Because we set up the Hello World VoiceRecorder to save the audio on the MyVox servers, instead of uploading it to some other location, we just refer to the audio file's URL from within the application. We show the URL to the user as a link, so she can click on it to hear the recording. And we're done!

Here's the app:


MyVox API "Hello World" Demo

This is a simple demonstration of the MyVox API using JavaScript. When you press the 'Start Hello World' button, a 'Recording List' containing a single 'Recording' placeholder is created, a recording session is started, and a phone number and PIN is displayed. Call the number, enter the PIN, and leave a recording. When you're done a link to the recording will appear.

Start Hello World

See the code here.

MyVox Get Started Links