def to_array(self):
        """
        Serializes this Voice to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
        """
        array = super(Voice, self).to_array()
        array['file_id'] = u(self.file_id)  # py2: type unicode, py3: type str

        array['duration'] = int(self.duration)  # type int
        if self.mime_type is not None:
            array['mime_type'] = u(self.mime_type)  # py2: type unicode, py3: type str

        if self.file_size is not None:
            array['file_size'] = int(self.file_size)  # type int
        return array