@override Object toJson() { return { 'speaker': speaker, if (voiceConfig != null) 'voiceConfig': voiceConfig!.toJson(), }; }