Announcements
- Today: Voice Recording equipment overview & demonstration at the IMM Cage with Dickie
- Tim Wisniewski, Chief Data Officer, The City of Philadelphia – Brown Bag Lunch Feb 20, 12:30-1:30 & 3:00-4:00 @ IMM
- Next Week, Feb 23 – Phone Polls
- Partner Organization Interviews, setting up for the week of Feb 23 or March 2
Design Notebooks
Let’s take a few minutes to go over some of your Design Notebook entries from last week.
Cage Visit
Let’s head over to the cage to meet with Dickie.
Design Patterns
Christopher Alexander – The Timeless Way of Building
The Gang of Four – Design Patterns
Interactive Voice Response (IVR) Patterns
Phone Menus
- keypad input
- voice input
Leave-a-Message
- crowd-sourced incident reporting
- oral histories
- voicemail
Phone Polls
- keypad input multiple choice
- voice response
Click-to-Call
- web/mobile interface to initiate a call out
SMS-to-Call
- sms message to initiate a call out
Voice Broadcast
- call out notification to a group of numbers
Message Broadcast
- SMS out to a group of numbers
Twilio Voice Recordings
Twilio’s Text-to-Speech engine is cool, but…
- language limitations (even Alice supports only 26 languages/dialects)
- sometimes we want greater flexibility with specific voices, i.e. celebrities
Today we’ll be using Twilio’s <Play> and <Record> TwiML verbs.
- Download the source code for this week’s examples from the class Github Organization.
- Unzip the repository on your local machine and upload the contents to a new folder in the ‘www’ folder on your TCNJ web account.
- Let’s try out the examples one by one.
Basic Voice Playback
Instead of using Twilio’s text-to-speech engine, let’s play back a recorded message.
- After you’ve uploaded the basic-voice.xml file to your TCNJ web account, log into Twilio, click into your number detail page, and edit the Voice request url for your number to point to ‘basic-voice-playback.xml’.
- Call your Twilio number.
- What happened?
<!-- basic-voice-playback.xml -->
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
Response
>
<Pl
ay
>http://www.mediamesis.net/imm/3hellos2.wav</Play
>
</
Response
>
Gathering Input
Now let’s use the <Play> verb with <Gather>.
- Upload matrix.xml and checkpill.php to your TCNJ web account and edit the Voice request url in the Twilio Dashboard for your number to point to your edited file.
- Call your Twilio number.
- What happened?
<!-- matrix.xml -->
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
Response
>
<
Gather
action="./check_pill.php" method="get"
finishOnKey
=
"*"
>
<Play
>http://www.mediamesis.net/imm/redpill.mp3</Play
> <Say>Press 1 to take the red pill.</Say> <Say>Press 2 to take the blue pill.</Say>
</
Gather
>
</
Response
>
/* checkpill.php */
<?php
$pill = $_REQUEST
[
'Digits'
];
header("content-type: text/xml");
echo
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
;
if($pill == 1){ // red pill
echo
"<Response>";
echo "<Play>http://www.mediamesis.net/imm/bluepill.mp3</Play>
";
echo "</Response>"
;
} else if($pill = 2) { // blue pill
echo
"<Response>";
echo "<Play>http://www.mediamesis.net/imm/matrix66.mp3</Play>"
echo
"</Response>";
} else { // other
echo "<Response>";
echo "<Say>Sorry, I didn't understand your selection. Please try again.
</Say>";
echo "<
Redirect
method
=\
"POST\"
>http://yourserver/matrix.xml</
Redirect
>";
echo "</Response>";
}
“Please Leave a Message…”
Now let’s try building a simple answering machine.
- Upload voicemail.xml and record.php to your TCNJ web account and edit the Voice request url in the Twilio Dashboard for your number to point to your edited file.
- Call your Twilio number.
- What happened?
<!-- voicemail.xml -->
<?xml version="1.0" encoding="UTF-8"?> <Response> <Say>Leave a message after the beep. Press the pound key when you're done recording.</Say> <Record action="http://www.tcnj.edu/~thompsom/imm-470-03/voice-recordings/record.php" method="GET" maxLength="20" finishOnKey="#" /> </Response>
/* recording.php */
<?php header("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; $recording = $_REQUEST['RecordingUrl']; $duration = $_REQUEST['RecordingDuration']; ?> <Response> <Say>Thanks for calling. Your message was <?php echo $duration; ?> seconds long. Here's the message you left.</Say> <Play><?php echo $recording; ?></Play> </Response>
Workflow for Creating Voice Menu Recordings
Basic flow
- Start with a flow diagram
- Prototype it using <Say>
- Create a script for the voice talent
- Record the messages
- Implement using <Play>
What about foreign languages/dialects?
- Hire talent from your client or client’s audience/community
- Use the Amazon Mechanical Turk
Challenge
Break into your groups and review the Twilio Audio Recording Best Practices.
Using Audacity or other audio recording software, create a voice menu + leave-a-message app that presents the caller with information about the upcoming HackTCNJ event and prompts them to record a message about what kind of app they’re thinking about creating at the event.
Create menu options for:
- Date, time and location
- An overview description of the event
- A sponsor listing
- Request the caller leave-a-message about what they’d like to create at the event
Assignment
Know Your Audience
- Read pages 52-59 in the Freedom Fone User and Advocacy Guide
- Create a new page in your Design Notebook and name it “Know Your Audience” and today’s date. Make a list of all the audience characteristics you feel would be important to your Partner Organization. Research as much as you can about each of the items discussed in the reading, filling in the information based upon what you know or can find out about your Partner Organizations’ communities.
Questions for Your Partner Organization
- Create a list of questions for your Partner Organization about their services and most pressing communication problems.
- Create another slide in your Design Notebook, titling it “Interview Questions” and today’s date., and drop in your list of questions from above.
- Next week, you’ll combine your questions with those from your teammates to create a master list.
*Assignments are due before class begins on Mondays. Be prepared to present your work in class for discussion.
https://docs.google.com/a/apps.tcnj.edu/presentation/d/191E2GYH1d4MST_5nx0x4kJOTI-g6gQhwxiLMSB8UH2o/edit?usp=docslist_api
https://docs.google.com/a/apps.tcnj.edu/presentation/d/13rgyeAPdF04T9dQnaOE649MLSvhXNquPLCgv2KRz4Bw/edit?usp=sharing
https://docs.google.com/presentation/d/1z5jDARfB0KlyNUTm9ONok04viUkPhWaCdkDr31lgFoI/edit?usp=sharing
https://docs.google.com/presentation/d/1xciwBlJNwFPcthMIZEcwlv5vZgNDwDUZmiTswgJo8yk/edit?usp=sharing
https://docs.google.com/presentation/d/1cYirAOqObF3T9q44yTitnSpkraRS_Dcbq6MqbSsAJxo/edit?usp=sharing
https://docs.google.com/a/apps.tcnj.edu/presentation/d/1kmo7knd0-xt9sywFIiwLWxSTbM2aeriwI6E2wGP8fa4/edit?usp=sharing
https://docs.google.com/presentation/d/1Ku9wovnVXvjVCIY4T2YPh1Tme36NtllxrRN_en_Oolo/edit?usp=sharing
https://docs.google.com/presentation/d/1B-SKdwz1Qm6yDukf6K9O_ZsADyh8Gdw7XdRewfeIWKs/edit?usp=sharing
https://docs.google.com/a/apps.tcnj.edu/presentation/d/1nJGpo9O9j_Dm8Ksp0PngsBhdD655crWrsvO6QjLJZuo/edit#slide=id.g69d805f97_017
https://docs.google.com/a/apps.tcnj.edu/presentation/d/1gZ0HFSUH8Kx-GAkzj7EY6KvYC3Qi0v1jyJtio9fSFqg/edit#slide=id.g69d77adea_00
https://docs.google.com/a/apps.tcnj.edu/presentation/d/1kFAAXg-q0PWNjHmD30QrkHz4PcU__-2gxQ53wJN9s8I/edit?usp=sharing
https://docs.google.com/a/apps.tcnj.edu/presentation/d/17t0CK-LhVvbBRRCbxOlePV9V9ihQ-LJ97x-jMP8-dQk/edit?usp=sharing
Here it is…
https://docs.google.com/a/apps.tcnj.edu/presentation/d/1-BIaIuVIkvEFJFui84eHSqkTC3h3VF4zyuvtEiggb74/edit#slide=id.g68966c5ba_05
https://docs.google.com/presentation/d/11x0ddyuC0KF_gk3Z9sT5KkwvhiBrGBGxFB0RPr3lmNc/edit?usp=sharing
https://docs.google.com/presentation/d/1pCthkUQ4Zb5b4ASolS7vk0Zh_vYpXu6mT9MMten3CgQ/edit?usp=sharing
https://docs.google.com/presentation/d/1IcWhm8d_Le29JDrr8AVAZctLMiOKAOYobFlPtYV56JI/edit?usp=sharing