def available_devices():
devices = {}<EOL>pA = pyaudio.PyAudio()<EOL>device_string = str()<EOL>for k in range(pA.get_device_count()):<EOL><INDENT>dev = pA.get_device_info_by_index(k)<EOL>devices[k] = {'<STR_LIT:name>': dev['<STR_LIT:name>'], '<STR_LIT>': dev['<STR_LIT>'], '<STR_LIT>': dev['<STR_LIT>']}<EOL>device_string += '<STR_LIT>' %(k,dev['<STR_LIT:name>'],dev['<STR_LIT>'],dev['<STR_LIT>'])<EOL><DEDENT>logger.debug(device_string)<EOL>return devices<EOL>
Display available input and output audio devices along with their
port indices.

:return:  Dictionary whose keys are the device index, the number of inputs and outputs, and their names.
:rtype: dict