我有一个非常简单的情况:
response = None
response = client.recognize(config, audio)
if response == None:
response = results {
alternatives {
transcript: ""
confidence: 0.0
}
language_code: None
}
print(response)
如果客户端不返回任何内容,我想用一个空对象初始化响应。
怎么做?即在python中构造一个json对象。