虚拟助手的问题,非ASCII字符'\ xc3'

时间:2018-10-23 20:42:28

标签: python character non-ascii-characters

我正在看一些创建虚拟助手的教程。现在只是拾起我的声音并写下我的话而已。

import speech_recognition as sr

r = sr.Recognizer()

with sr.Microphone() as s:
r.adjust_for_ambient_noise(s)

while True:
    audio = r.listen(s)

    speech = r.recognize_google(audio, language='pt')

    print('Você disse: ', speech)

但是,当我在终端中使用

打开它时

$ python /Users/danieldossantos/Desktop/jarvis/chats/main.py

返回,

文件“ /Users/danieldossantos/Desktop/jarvis/chats/main.py”,第13行 语法错误:第13行的/Users/danieldossantos/Desktop/jarvis/chats/main.py文件中的非ASCII字符'\ xc3',但未声明编码;有关详情,请参见http://python.org/dev/peps/pep-0263/

0 个答案:

没有答案