Created
January 9, 2012 23:10
-
-
Save RobSpectre/1585538 to your computer and use it in GitHub Desktop.
Faking audio scrubbing using discrete audio chunks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include Twilio helper library | |
require("Services/Twilio.php"); | |
// Instantiate Twilio Response object to render TwiML. | |
$response = new Services_Twilio_Twiml(); | |
$gather = $response->gather(array('numDigits' => 1)); | |
if (isset($_REQUEST['Digits'])) { | |
$gather-say('Playing part '.$_REQUEST['Digits']); | |
$gather->play('part'.$_REQUEST['Digits'].'.mp3'); | |
} else { | |
// No digit set - play first track | |
$gather->play('part1.mp3'); | |
} | |
print $response; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment