# How to get consecutive voice clips to sound natural

In the game I'm working on I have to play several short consecutive voice-clips to form a complete sentence. Example (each [] bracket is a different voice clip):

[Bob here,] [we're at] [some town] [and are on our way to] [some city].

Stitching together different voice-clips like this makes it sound stilted and disconnected. This is because there are unnatural pauses when switching clips, and the pitch and tone of the speaker changes.

My current efforts include two methods for removing the unnatural pauses:

1. starting the next clip early if a silence is detected at the end of the preceding clip
2. skipping the first few milliseconds of the new clip up to the first detected 'sound'.

These work OK at removing the unnatural pausimh, but detecting what 'silence' is is difficult, especially when dealing with multiple voice-actors and microphones.

How could I make stitching together voice-clips sound more natural? Any advice would be appreciated. This has to be done in real-time inside the game (I'm using Unity), and can't be pre-processed or done ahead of time.

• Detecting the boundaries of speech is, I think, a Hard Problem. If you're absolutely sure you're unable to solve the whole problem offline, can you solve part of it? E.g. can you process the clips to conform to the same definitions of 'silence' and 'max volume'? (i.e. remove the mic from the question) – Chris Mills-Price Sep 26 '19 at 20:14
• @ChrisMills-Price Yes, the clips could be normalized to have the same levels of volume, which should make detecting 'silence' easier. That's a good idea. – DeeCeptor Sep 26 '19 at 20:38

you can assign multiple audio sources to one object. for exxample maximum 10 phrases in a sentence. so you have:

AudioSource[] Phrases;

void Awake()
{
phrases[0] = GetComponents<AudioSource>()[0];
}


then you can get length of clip that check what is best place to start new phrase audio source. like this:

  phrases[1].Play(phrases[0].clip.length +or- someuLongValue);// for better syncing