Saturday, June 21, 2014

Recording the Self-presenting Presentation

If you watched the screencast video in my last post, "Free Voice Talent ..." you may have noticed that I used a TTS voice for parts of the presentation. What is not evident is the fact that this recorded presentation was entirely automatic, including the human and TTS narration. It was a self-presenting presentation.

Here's how it is done using only ScreenFlow, Keynote, Applescript and Apple's built-in text to speech (TTS) capabilities.

We start by creating a Keynote presentation and making the presenter's notes visible with View > Show Presenter Notes which looks like this:


Next, we create a slide in the Keynote deck using the presenter notes to script the narration for that slide. Repeat until you have laid out all visual and narrative aspects of your message.

At this point, we need to develop an Applescript application that will launch Keynote and cause the presenter notes to be read with a TTS voice. So, go to /Applications/Utilities, open Applescript Editor. Copy and paste in the following script:

property defaultSlideDuraton : 2
property pauseBeforeSpeaking : 1.5
property stoppingStatement : "[[slnc 1000]] Stopping presentation."

tell application "Keynote"
if not (exists document 1) then error number -128

if playing is true then stop the front document

tell document 1
set the slideCount to the count of slides
start from first slide
end tell
repeat with i from 1 to the slideCount
if playing is false then
my speakSlideNotes(stoppingStatement)
error number -128
end if
tell document 1
set thisSlidesPresenterNotes to presenter notes of slide i
end tell
if thisSlidesPresenterNotes is "" then
delay defaultSlideDuraton
if pauseBeforeSpeaking is not 0 then
delay pauseBeforeSpeaking
end if
my speakSlideNotes(thisSlidesPresenterNotes)
end if
if i is slideCount then
exit repeat
if playing is false then
my speakSlideNotes(stoppingStatement)
error number -128
end if
show next
end if
end repeat

tell document 1 to stop
on error errorMessage number errorNumber
if errorNumber is not -128 then
display alert (("ERROR " & errorNumber) as string) message errorMessage
end if
end try
end tell

on speakSlideNotes(thisSlidesPresenterNotes)
if thisSlidesPresenterNotes begins with "[voice:" then
set x to the offset of "]" in thisSlidesPresenterNotes
set textToSay to text from (x + 1) to -1 of thisSlidesPresenterNotes
set thisVoiceName to text 8 thru (x - 1) of thisSlidesPresenterNotes
say textToSay using thisVoiceName
say thisSlidesPresenterNotes -- with waiting until completion
end if
end speakSlideNotes

Save it as a script so that you can use it at any time in the future.

At this point, you could set ScreenFlow to record and then Run the script with your Keynote presentation open and in the forefront. The default system voice will read each slide as it is presented. The presentation will automatically exit after the last slide has been narrated so you can stop the ScreenFlow recording, trim the ends in ScreenFlow and be done.

However and as we discussed in the last post, you may not be satisfied with such a plain vanilla rendition. Thus, we get into a few of the more sophisticated techniques that apply to this kind of work. You should already know about auditioning, using phonetic mis-spelling, punctuation and embedded speech commands to create a more human-sounding rendition of text. If not, review the "Free Voice Talent ..." post for the details.

To these we will add two new techniques: 1) Adjusting for video and animation. 2) Selecting voices on a per slide basis.

Adjusting for video and animation. If your presentation includes a video clip as the screencast referenced here does, you'll need to build in a delay that is equal to the duration of the video. This can be done with the embedded speech command [[slnc nnn]] where nnn is the duration of the embedded video in milliseconds. The following screenshot is of a slide containing a video with a duration of 9 minutes 16.033 seconds. That converts to 556,000 milliseconds. YMMV (Your math may vary).


This also applies to any transitions or animations that you may have included. Simply run the script without recording to audition the slide making adjustments to the placement and duration of the silence command. This command, as you learned from the last post, is also very useful in creating appropriate pauses between paragraphs.

Selecting voices on a per slide basis. Since there is no embedded speech command that enables selecting which voice is operative, we do this via the speakSlideNotes function in the script. This special command must be the first text encountered in the presenter notes (no leading spaces, please). Inserting [voice:Daniel] as the first element in the presenter notes for a slide will cause that voice to be used - no need to change the system default. Note the single (not double) square brackets. This is especially valuable as you may use an alternating male and a female voice to add narrative interest to your screencast. The following screenshot illustrates the use of this special command.


So that's all there is to it. Create a slide deck in Keynote, add presenters notes, audition and adjust the text of the presenter notes with the provided Applescript until the desired presentation with narration is achieved. Then, launch ScreenFlow to record the self-presenting presentation, execute the script, stop recording, trim and export.

Because voice quality and variety is so easily assured with a single take, this could be called Rapid Screencast Development (RSD).

No comments:

Post a Comment