Handle SpeechSegment; fix bugs