КОД!
import speech_recognition as sr
for index, name in enumerate(sr.Microphone.list_microphone_names()):
print(“Microphone with name \”{1}\“ found for `Microphone(device_index={0})`”.format(index, name))
ОШИБКА!
C:\Users\iljac\Desktop\Ghjuhfvvs>123.py
Traceback (most recent call last):
File “C:\Users\iljac\Desktop\Ghjuhfvvs\123.py”, line 3, in <module>
print(“Microphone with name \”{1}\“ found for `Microphone(device_index={0})`”.format(index, name))
File “C:\Users\iljac\AppData\Local\Programs\Python\Python35\lib\encodings\cp866.py”, line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)
UnicodeEncodeError: ‘charmap’ codec can't encode characters in position 22-35: character maps to <undefined>