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