Accessing Twilio TranscriptionText in a simple PHP application
up vote
0
down vote
favorite
I need to retrieve the transcription of a recording done with the Record Twiml verb but I can't get it to work.
Here's what I've tried:
1. call.php
<Response>
<Record maxLength="5" transcribe="true" action="getTranscription.php" />
</Response>
2. getTranscription.php
<Response>
<Say>Here's your audio recording transcription: <?php echo $_REQUEST['TranscriptionText']; ?></Say>
</Response>
I have no problem recording voice and playing it back with the following code:
1. call.php
<Response>
<Record action="getRecording.php" />
</Response>
2. getRecording.php
<Response>
<Say language="fr-CA">Here's your audio recording.</Say>
<Play><?php echo $_REQUEST['RecordingUrl']; ?></Play>
</Response>
It would be really appreciated if you guys could give me some hints on how to get the transcription back. Thanks a lot!
php twilio twiml
add a comment |
up vote
0
down vote
favorite
I need to retrieve the transcription of a recording done with the Record Twiml verb but I can't get it to work.
Here's what I've tried:
1. call.php
<Response>
<Record maxLength="5" transcribe="true" action="getTranscription.php" />
</Response>
2. getTranscription.php
<Response>
<Say>Here's your audio recording transcription: <?php echo $_REQUEST['TranscriptionText']; ?></Say>
</Response>
I have no problem recording voice and playing it back with the following code:
1. call.php
<Response>
<Record action="getRecording.php" />
</Response>
2. getRecording.php
<Response>
<Say language="fr-CA">Here's your audio recording.</Say>
<Play><?php echo $_REQUEST['RecordingUrl']; ?></Play>
</Response>
It would be really appreciated if you guys could give me some hints on how to get the transcription back. Thanks a lot!
php twilio twiml
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to retrieve the transcription of a recording done with the Record Twiml verb but I can't get it to work.
Here's what I've tried:
1. call.php
<Response>
<Record maxLength="5" transcribe="true" action="getTranscription.php" />
</Response>
2. getTranscription.php
<Response>
<Say>Here's your audio recording transcription: <?php echo $_REQUEST['TranscriptionText']; ?></Say>
</Response>
I have no problem recording voice and playing it back with the following code:
1. call.php
<Response>
<Record action="getRecording.php" />
</Response>
2. getRecording.php
<Response>
<Say language="fr-CA">Here's your audio recording.</Say>
<Play><?php echo $_REQUEST['RecordingUrl']; ?></Play>
</Response>
It would be really appreciated if you guys could give me some hints on how to get the transcription back. Thanks a lot!
php twilio twiml
I need to retrieve the transcription of a recording done with the Record Twiml verb but I can't get it to work.
Here's what I've tried:
1. call.php
<Response>
<Record maxLength="5" transcribe="true" action="getTranscription.php" />
</Response>
2. getTranscription.php
<Response>
<Say>Here's your audio recording transcription: <?php echo $_REQUEST['TranscriptionText']; ?></Say>
</Response>
I have no problem recording voice and playing it back with the following code:
1. call.php
<Response>
<Record action="getRecording.php" />
</Response>
2. getRecording.php
<Response>
<Say language="fr-CA">Here's your audio recording.</Say>
<Play><?php echo $_REQUEST['RecordingUrl']; ?></Play>
</Response>
It would be really appreciated if you guys could give me some hints on how to get the transcription back. Thanks a lot!
php twilio twiml
php twilio twiml
edited Nov 11 at 0:16
asked Nov 10 at 21:32
mckaymental
104
104
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Twilio developer evangelist here.
The transcription of a recording is done asynchronously to the call so you won't get the result when you get the webhook to the action
URL.
So, you need to provide a transcribeCallback
attribute too.
<Response>
<Record maxLength="5" transcribe="true" action="getRecordResult.php" transcribeCallback="getTranscription.php" />
</Response>
There is no guarantee on how long the transcription will take, so it's hard to play the transcription back to the caller. It's better to use the transcribeCallback
URL to save the transcription alongside the call record.
If you are trying to drive the call based on transcribing the caller's words then using <Record>
and transcriptions is not recommended. Instead, I recommend you check out using <Gather>
with input="speech"
. This will give you live voice transcription in the call.
Let me know if this helps at all.
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Twilio developer evangelist here.
The transcription of a recording is done asynchronously to the call so you won't get the result when you get the webhook to the action
URL.
So, you need to provide a transcribeCallback
attribute too.
<Response>
<Record maxLength="5" transcribe="true" action="getRecordResult.php" transcribeCallback="getTranscription.php" />
</Response>
There is no guarantee on how long the transcription will take, so it's hard to play the transcription back to the caller. It's better to use the transcribeCallback
URL to save the transcription alongside the call record.
If you are trying to drive the call based on transcribing the caller's words then using <Record>
and transcriptions is not recommended. Instead, I recommend you check out using <Gather>
with input="speech"
. This will give you live voice transcription in the call.
Let me know if this helps at all.
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
add a comment |
up vote
0
down vote
accepted
Twilio developer evangelist here.
The transcription of a recording is done asynchronously to the call so you won't get the result when you get the webhook to the action
URL.
So, you need to provide a transcribeCallback
attribute too.
<Response>
<Record maxLength="5" transcribe="true" action="getRecordResult.php" transcribeCallback="getTranscription.php" />
</Response>
There is no guarantee on how long the transcription will take, so it's hard to play the transcription back to the caller. It's better to use the transcribeCallback
URL to save the transcription alongside the call record.
If you are trying to drive the call based on transcribing the caller's words then using <Record>
and transcriptions is not recommended. Instead, I recommend you check out using <Gather>
with input="speech"
. This will give you live voice transcription in the call.
Let me know if this helps at all.
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Twilio developer evangelist here.
The transcription of a recording is done asynchronously to the call so you won't get the result when you get the webhook to the action
URL.
So, you need to provide a transcribeCallback
attribute too.
<Response>
<Record maxLength="5" transcribe="true" action="getRecordResult.php" transcribeCallback="getTranscription.php" />
</Response>
There is no guarantee on how long the transcription will take, so it's hard to play the transcription back to the caller. It's better to use the transcribeCallback
URL to save the transcription alongside the call record.
If you are trying to drive the call based on transcribing the caller's words then using <Record>
and transcriptions is not recommended. Instead, I recommend you check out using <Gather>
with input="speech"
. This will give you live voice transcription in the call.
Let me know if this helps at all.
Twilio developer evangelist here.
The transcription of a recording is done asynchronously to the call so you won't get the result when you get the webhook to the action
URL.
So, you need to provide a transcribeCallback
attribute too.
<Response>
<Record maxLength="5" transcribe="true" action="getRecordResult.php" transcribeCallback="getTranscription.php" />
</Response>
There is no guarantee on how long the transcription will take, so it's hard to play the transcription back to the caller. It's better to use the transcribeCallback
URL to save the transcription alongside the call record.
If you are trying to drive the call based on transcribing the caller's words then using <Record>
and transcriptions is not recommended. Instead, I recommend you check out using <Gather>
with input="speech"
. This will give you live voice transcription in the call.
Let me know if this helps at all.
answered Nov 13 at 2:58
philnash
36k93352
36k93352
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
add a comment |
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
Glad to hear it! Hope the rest of your application goes well.
– philnash
Nov 14 at 6:24
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243616%2faccessing-twilio-transcriptiontext-in-a-simple-php-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown