code: def ListVoices(voice_spec=None):
      '''Reads the voice files from espeak-data/voices and returns a list of VOICE objects.
  
     If voice_spec is None then all voices are listed.
     If voice spec is given, then only the voices which are compatible with the voice_spec
     are listed, and they are listed in preference order.'''
      ppv = cListVoices(voice_spec)
      res = []
      i = 0
      while ppv[i]:
          res.append(ppv[i][0])
          i += 1
      return ref ListVoices(voice_spec=None):
      '''Reads the voice files from espeak-data/voices and returns a list of VOICE objects.
  
     If voice_spec is None then all voices are listed.
     If voice spec is given, then only the voices which are compatible with the voice_spec
     are listed, and they are listed in preference order.'''
      ppv = cListVoices(voice_spec)
      res = []
      i = 0
      while ppv[i]:
          res.append(ppv[i][0])
          i += 1
      return res
docs: Reads the voice files from espeak-data/voices and returns a list of VOICE objects.
  
     If voice_spec is None then all voices are listed.
     If voice spec is given, then only the voices which are compatible with the voice_spec
     are listed, and they are listed in preference order.