import xpinyin

p = xpinyin.Pinyin() #实例化

print(p.get_pinyin('张流量',''))