@override Object toJson() => { 'speaker': speaker, if (voiceConfig case final voiceConfig?) 'voiceConfig': voiceConfig.toJson(), };