Speech to text code | XM Community
Solved

Speech to text code


Badge +2
  • Level 1 ●
  • 2 replies

Hi,

 

I am wanting to add the option for participants to use a speech to text dication to answer some of the questions in my survey.

 

Is there a way that I can do this?

 

Thanks in advance,

 

M

icon

Best answer by tannerfaragher 16 May 2023, 05:15

View original

5 replies

Userlevel 5
Badge +22

Hello there! Qualtrics recently released a new question type called the Video Feedback Question. In it, you can allow respondents to either video or voice record their response to you. The awesome thing about this is that it will leverage Text iQ to transcribe their response for you in Data & Analysis, on top of giving you a sentiment and topic assessment of their response.

This new feature is only available to certain users depending on their license. I would reach out to your AE or Brand Admin to see if this feature is available to you or if you would be able to upgrade. One note, however: utilizing this question will take three billable responses on your license, in addition to the one billable response for the survey response as a whole.

Either way, this feature has been groundbreaking in my experience and I would highly recommend it.

Badge +2

Thank you for your prompt response.

 

Do you know if the audio recordings are available or is it only the transcripts that are available?  I only ask as I need to not be able to access any identifying information (which a voice recording could be) to maintain anonymity for my research.

 

 

Userlevel 5
Badge +22

Hey @MA1, I know that if respondents record a video, you will be able to view the video and put it into the Dashboard as a form of a slideshow, or even create a reel of multiple responses. I have not seen any documentation referencing what we can do with the audio recordings on our side but I would imagine that if needed we could access them.

Badge +2

Great. Thank you for your help :)

Userlevel 7
Badge +27

Another way to do this is to use the SpeechRecognition interface of the Web Speech API and toggle it with a button click. This will not save a recording of the respondent's voice to Qualtrics, but their voice can be used to transcribe text into a Text Entry question. As SpeechRecognition is not supported in Firefox, I recommend using a Google Chrome browser.

To give it a try, set the survey to Classic layout and create a Text Entry question. Use the Rich Content Editor's HTML/Source view "<>" to update the Question Text with the below:

Click to write the question Text<br>
<button id="btn1">Record Speech New</button><button id="btn2">Record Speech Continue</button>

Then, add the below to the question's JavaScript in the OnReady section.

var qid=this.questionId;

function SpeechRecogNew() {
var textBox = document.getElementById("QR~"+qid);
let recognization = new webkitSpeechRecognition();
recognization.onstart = () => {
textBox.value = "Listening...";
}
recognization.onresult = (e) => {
var transcript = e.results[0][0].transcript;
textBox.value = transcript;
}
recognization.start();
}

function SpeechRecogContinue() {
var textBox = document.getElementById("QR~"+qid);
var textBoxValue = textBox.value;
let recognization = new webkitSpeechRecognition();
recognization.onstart = () => {
textBox.value = "Listening..."+textBoxValue;
}
recognization.onresult = (e) => {
var transcript = e.results[0][0].transcript;
textBox.value = textBoxValue +" "+ transcript;
}
recognization.start();
}

document.getElementById("btn1").onclick = SpeechRecogNew;
document.getElementById("btn2").onclick = SpeechRecogContinue;

There are 2 buttons: 1 that will generate a new recording and 1 that will add on to whatever text is already there.

 

Leave a Reply