Speech¶
Qualified name: algan.animation\_timeline.animation\_contexts.Speech
- class Speech(transcript, *, wait_at_end=1.0, **kwargs)[source]¶
Bases:
AudioNarrate a line, and fit the block’s animations to how long it takes to say.
The script text is looked up in the Scene’s audio manager, and the block runs for exactly as long as that narration. Write the sentence, animate what should happen while it is spoken, and the timing follows – which is how a whole explanatory video stays in sync with its voiceover.
- Parameters:
transcript – The line of narration to play. It is appended to the Scene’s transcript and used to select the matching audio.
wait_at_end (float) – Extra seconds to hold after the line finishes. Defaults to
1, leaving a beat between sentences.**kwargs (Any) – Passed to
Audio.
Examples
with Speech("Now watch what happens when we double it."): square.scale(2)
Methods
Attributes
animation_managerchild_contextscombine_easingcomposed_easingcurrent_timeWhere the authoring cursor sits within this context, in seconds.
easingend_timeThe furthest time anything recorded in this context reaches, in seconds.
equalize_runtimesfinishedkwargslag_rationew_animationnew_mobsprev_contextpriority_levelrecord_attr_modificationsrecord_funcsruntimeruntime_per_partspawn_at_end