1. A non-transitory computer-readable storage medium storing instructions which, when executed by a computing device, cause the computing device to generate a video sequence having mouth movements synchronized with speech sounds, the instructions comprising: calculating a target cost for each candidate n-phone from a database of n-phones for a target sequence; building a video frame lattice of candidate video frames based on the candidate n-phones; assigning a joint cost to each pair of adjacent video frames; and constructing the video sequence according to a Viterbi search on the video frame lattice by finding the optimal path through the lattice according to the minimum of the sum of the target cost and the joint cost over the sequence.