def getDevices(kind=None):
 devs = {}
 if travisCI:
  return devs
 else:
  allDevs = sd.query_devices(kind=kind)
 if (type(allDevs) == dict):
  allDevs = [allDevs]
 for (ii, dev) in enumerate(allDevs):
  devs[dev['name']] = dev
  dev['id'] = ii
 return devs

def getDevices ( kind = None ) : devs = { } if travisCI : return devs else : allDevs = sd . query_devices ( kind = kind ) if ( type ( allDevs ) == dict ) : allDevs = [ allDevs ] for ( ii , dev ) in enumerate ( allDevs ) : devs [ dev [ 'name' ] ] = dev dev [ 'id' ] = ii return devs
returns a dict of dict of audio devices of sepcified kind the dict keys are names and items are dicts of properties .