python 10-22遇到的問題



def test():
    config = "******************************************"
    ret = msc.mspQISRInit(config)
    if ret!=0:
        print "mspQISRInit failed! ret = %d" % ret
        return ret 
    param = "ssm=1, sub=iat, aue=speex-wb;7, auf=audio/L16;rate=16000,\
            ent=sms16k, rst=plain, vad_speech_tail=1500"
    errcode, sid = msc.mspQISRSessionBegin(None, param)
    print 'sid:',sid
    if 0!=errcode:
        print "QISRSessionBegin failed! ret = %d" % ret
        return ret
    ret,content = msc.mspQISRGiveandGet(sid,"wav_test.wav",0)
   
    if content!='':
        print content
    if ret != 0:
        print 'error'
    ret = endtx(sid,"normal")
    print "content:",content
    
if __name__=='__main__':
    test()

###### 若使用上述if 語句正常print   ‘my nae 一二三四’

######若使用print test()  : 打印出‘my nae \x*\x********’之類的。初步懷疑字符編碼,仍未解決。待解決。
        


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章