<div id="transcriptWrapper">
  <ul id="transcript">
    <li class="speaker1"><strong class="speakerName">Justin</strong>: What I am trying to say is that the appeal and the settlement are separate.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: You mean that communications and announcements internal and external would be brought into the appeal process.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Right, because they connect to the appeal.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: I hope you understand there are issues of reputation, and I have to deal with those in the appeal process rather than the commercial issues around settlement.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: And then, there is this legal claim for defamation. I believe that the implication would be to perceive in for defamation.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: Yes. I will investigate to what we have as written evidence and what we do not have.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Okay. Great! I am thankful for you to do that.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: Absolutely. Evidences are important in order to understand whether the party in question has acted appropriately through this process, and there is greater possibility of defamation to everybody in circumstance like this.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Exactly.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: I hope you feel that you have been listened to.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Yes, absolutely. Thank you.</li>
  </ul>
</div>
<div id="transcriptWrapper">
  <ul id="transcript">
    <li class="speaker1"><strong class="speakerName">Justin</strong>: What I am trying to say is that the appeal and the settlement are separate.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: You mean that communications and announcements internal and external would be brought into the appeal process.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Right, because they connect to the appeal.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: I hope you understand there are issues of reputation, and I have to deal with those in the appeal process rather than the commercial issues around settlement.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: And then, there is this legal claim for defamation. I believe that the implication would be to perceive in for defamation.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: Yes. I will investigate to what we have as written evidence and what we do not have.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Okay. Great! I am thankful for you to do that.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: Absolutely. Evidences are important in order to understand whether the party in question has acted appropriately through this process, and there is greater possibility of defamation to everybody in circumstance like this.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Exactly.</li>
    <li class="speaker2"><strong class="speakerName">Alistair</strong>: I hope you feel that you have been listened to.</li>
    <li class="speaker1"><strong class="speakerName">Justin</strong>: Yes, absolutely. Thank you.</li>
  </ul>
</div>
<audio id="audio" ontimeupdate="playTranscript()" controls>
  <source src="http://media02.hongkiat.com/display-audio-transcript/sample.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
  </source>
</audio>
body {
	font-family: Arial, sans-serif;
}
#transcriptWrapper {
	width: 500px;
	height: 250px;
	overflow: hidden;
}
#transcript {
	font-family: garamond;
	font-size: 14pt;
	list-style: none;
	border-left: 1px solid;
	padding-left: 13px;
	position: relative;
}
#transcript > li {
	margin: 5px 0;
	padding: 5px;
	-webkit-filter: blur(3px);
	filter: blur(3px);
	transition: all .8s ease;
	list-style-type: disc;
}
.speaker1 {
	background: #F5E566;
}
.speaker2 {
	background: #F57E66;
}
.speakerName {
	text-transform: uppercase;
}
.speaking {
	-webkit-filter: blur(0px) !important;
	filter: blur(0px) !important;
}
    var dialogueTimings = [0,4,9,11,18,24,29,31,44,45,47],
        dialogues = document.querySelectorAll('#transcript>li'),
        transcriptWrapper = document.querySelector('#transcriptWrapper'),
        audio = document.querySelector('#audio'),
        previousDialogueTime = -1;   

     function playTranscript() {

        var currentDialogueTime = Math.max.apply(Math, dialogueTimings.filter(function(v){return v <= audio.currentTime}));

        if(previousDialogueTime !== currentDialogueTime) {
            previousDialogueTime = currentDialogueTime;
            var currentDialogue = dialogues[dialogueTimings.indexOf(currentDialogueTime)];
            transcriptWrapper.scrollTop  = currentDialogue.offsetTop - 50;  
            var previousDialogue = document.getElementsByClassName('speaking')[0];
            if(previousDialogue !== undefined)
                previousDialogue.className = previousDialogue.className.replace('speaking','');
            currentDialogue.className +=' speaking';
        }
    }
;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.