1. A method comprising: synthesizing speech from a text; identifying an acoustic unit sequential pair in the speech; searching for a concatenation cost for the acoustic unit sequential pair in a database using a hash table for the database; and when the concatenation cost is not found in the database, assigning a default value as the concatenation cost for the acoustic unit sequential pair.