如何播放我使用发声器将文本转换为语音的响应?

时间:2016-04-03 08:35:03

标签: python unirest

import unirest

response = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=secret",

   headers={
     "X-Mashape-Key": "secret",
     "Content-Type": "application/x-www-form-urlencoded"
   },

   params={
     "c": "mp3",
     "f": "8khz_8bit_mono",
     "hl": "en-us",
     "r": 0,
     "src": "Hello, world!"} )

我用过:reponse.body() and response.play() 它们都不起作用。 它的确切片段是什么?

response.raw_body是: “ID3 \ X04 \ X00 \ X00 \ X00 \ X00 \ X00 \ x19TSSE \ X00 \ X00 \ X00 \ X0F \ X00 \ X00 \ x03Lavf54.21.100 \ X00 \ XFF \ xe38 \ XC0 \ X00 \ X00 \ X00 \ X00 \ X00 \ x00 \ x00 \ x00 \ x00Info \ x00 \ x00 \ x00 \ x07 \ x00 \ x00 \ x00 \ x00 \ x00 \ t \ xd8 \ x00 \ x1d \ x1d \ x1d $$$ +++ 333 ::: AAAIIIPPPWWWW ___ fffmmmuuu | || \ X83 \ X83 \ X83 \ x8a \ x8a \ x8a \ X92 \ X92 \ X92 \ X92 \ X99 \ X99 \ X99 \ XA0 \ XA0 \ XA0 \ xa8 \ xa8 \ xa8 \ XAF \ XAF \ XAF \ XB6 \ XB6 \ XB6 \ XBE \ XBE \ XBE \ XC5 \ XC5 \ XC5 \ XCC \ XCC \ XCC \ XCC \ XD4 \ XD4 \ XD4 \ XDB \ XDB \ XDB \ XE2 \ XE2 \ XE2 \ XEA \ XEA \ XEA \ XF1 \ XF1 \ XF1 \ XF8 \ XF8 \ XF8 \ XFF \ XFF \ xffLavf54.21.100 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 $ \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ XFF \ XE3 \ X18 \ XC4 \ X00 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ X00 \ xffx?\ XF2 \ X07 \ XF8 \ X14 \ X1F \ XFE \ XF2 \\ XFF \ XFF \ xe5 \ x9d \ n \ xe0 \xbf\xff\xfd\x86\xbfFo\xff\xff\xf6WB)\x03\xa1\x04\x13\xff\xff\xff\xcc\x0cp\x00\x00\x82\xb0\xc7\xff\xfe\x84\x86 u\x16\xe8\xff\xbc\xcc\x1d \ XFF \ XE3 \ X18 \ XC4; \ X00 \ X00 \ x03H \ X01 @ \ X00 \ X00 \ XB7 \ ti15 \ XA0 \ XFB \ xa8 \ XACA \ xc2x9JM \ xf63&GT; 1 H \ X0C @ \ x974O \ XAD4 \ XDC \ xc0p \ X06 \ XC1A)\ XF c \ xf9 \ xe7 \ xfe。\ x8d \ xe1B \ x15 \ xbf \ xaf \ xe9 \ x03 \ x1e \ xc8 \ xc7 \ xd07 \ x9f \ xfd \ xa8 @ \ x98 \ xad \ xff \ xe3 \ x18 \ xc4v \ X0C \ XE2 \ XC2 \ XA4 \ X01 \ X81 \ X10 \ X00 \ X13 \ x9d \ XFF \ XFF \ XFF:@ \ xbaM \ XF4 \ X03 \ XE1 \ x9at6 \ XDF \ XFF \ XFF \ XFF \ xe8Z \ X19 \ XFF \ XD0 \ X0F \ X15 +:W N \ X17 \的x87 \ XC4 \ XEE \ XFE \ XE7 \ x995 \ X1E \ x8b \ XCD \ xcfE \ x7f0 \ X0C $ \ X1D \ x15O \ xe8 \ XA2 \ XA1 \ XD2 \ XB7 \ XD5 \ X04 \ x8e \ XFF \ XE3 \ X18 \ XC4} \ X15版权所有\ xA9 \ XC6 \ XC4 \ X01 \ xcdH \ X00 \ X1D \ x0e \ x8b \ X19 \ 0x7F部分\ XCCC \ X0B \ X01〜\ x8a \ X16 \ XDF \ XF5 \ xc9 \ X00 \ X1C-S \ XBB \ xeaTg \ X01 \ XDE%N \ XAD%升\ X89&安培; \ n \ XD8 \ XC0 \吨\ x91j(\ xdbMD \ x80r \ X06 \ x15m \ XFE H\x04H\xff\xf3\x88\x1c\xdf\xe4A\xff\xe3\x18\xc4a\x0c!\x82\xd4\x00:\xcaL\x011Q\'n\x8a.&\x1f\x10\x138\xe7v\\9\x0f\xff\xf8N\x0b$\x0c\xff\xda<\x80\xd0\xfe\x85_\xcf\xf8*\tA\xa11\xf7\xf3\xf4\x918<\x9fdW\xff\xe9&P\xc3?\xc7E\xa3\xe7\xd0\xcf\xff\xe3\x18\xc4k\x0f\xf9\xbe\xc4\x00kJp\xb3\x86F\xe7\xfe\x8e5\x1c.\xce\xf12\x10\xcd\xff\x91\x00p!\x81@p\x9c\xff\xca\x82\xe8-\x02\xa0i\np\\\x0b\xc2N\x8a"DH\\\x8dE\xa2V=\x0c39X\xe9\x19\x1c\xd1;\xf5dt\xff\xe3\x18\xc4f\r\xa9\xaa\xc4\x00R\xcep\xac\x8e\xe0\xd8w\x0b\x075\xc4\xa0\xb5\x14c\xa6f\'\xcf:\xbd@_\x17F\xa51d\x90\x16\xab.\x8ch\xce)I\x19\x0ew\x93\x8aF#\xb4\x9aFsU.H\xff\x99\x0e\xe1*t\x13\xd9\x96\x8a\xff\xe3\x18\xc4j\x0eYZ\xc8\x01J\x18\x01H\xff\x85\xb4+\x81T\x9b,\x9ad\x82\xc1#\xb1\x1f\xc9\x00\t\x06\x84+\n\x8a\x95"*\xef\xc1\x16\x08\xc2b\xa7\xc6)\xf4\xb9\xa8\xfe|x\x1cT\x0b\xebt\xea\x15\x0c\x1a\xb5\xca\n\xc3\xbc\x92\x8f\x08\xff\xe3\x18\xc4k\x18\x11Z\x90\x01\x90h\x00\x96\x1a-\xd6t\x92\x8f/\xf5\x9d-\xfd\xe5\x7f\xc4_\xff\xfe\xcf\xfeF\x1a-\xf0\xd2\x8f\x15\xfaVt\xb2\xff\x1e\x10\x8baO\xfe<Q\\e\xfe!\x01@\xfd?\xfd\n\x1f\x07#\x7f\xff\xb5\xb9\xd3\xff\xff\xe3\x18\xc4E\n(\x05\xcc\xf9\xc0\x00\x00\xff\xd8q\xe4S\x8b\x9c\xff\xf9\x8f\xff\xfci\xb3\x93\x1f\xff\xff\xd3\x9f\xe6\xb1^\xf9\\\x89\x93\x0e\xad\x9c\x9a\x1b\xbf\xcf\x81i\xa9\xe5b\x90\x95\xa6\xd5|\xf1\xfe\xc3 BP \ XAD \ X08 \ X05 \ x19p \ X90 ==ñ\ XFF \ XE3 \ X18 \ xc4W \ X00 \ X00 \ x03H \ X01 @ \ X00 \ X00 \ xf9 \ x996}&LT; \ X81 \ x00F \ X1D \ X89)^ \ xa6 \ XD4 \ xf56 \ XB0 \ XC2 \ x88N \ x8e {\ XF4 \ XFA \ XFF \ XDD \ x9f \ XCD \ xef9 \ XFC \ xa8 \ XB2 \ XDF \ XC2 \ XADR \ xd9 \ xfdvR; \ XF5 \ XAF \ XFE \ X-ADË\ x87P \ x0e \ XD1 \ X93 \ XDA \ XB5 \ xeaqj \ X04 \ XFF \ XE3 \ X18 \ XC4 \ X92 \ X0B \ xb9 \ xaaP \ X01 \ x8a(\ X00 \ xc4p \ X93 \ xa8 $ \ XA4 \ x9d \ xd3E \ X11 \ XF4 \ X00 \ X1C \ X1D \ x92MsZS \ X04 \ XCB \ X84 \ xd94 \ x01V4O〜\西飞\ x8c \ X19 \ x90z \ XBF \ XF1 \ XF0〜\ X12 \ X03 \ XA3 \ xc8 \ XA7 \ XE3 \ xe0,\ X13 \ X00 \ XF2 \ X84 = NC \ x0e \ X1D \ xf9 \ X0F \ XDF \ XEA \ XFF \ XE3 \ X 18 \ XC4 \ x9e \ x16y \ X96 \ x9c \ X01 \ x9a \ X88 \ X009 \ XF5 \ x9a \ X14 \ XFF \ XF2 \ X80 {\ XFE \ XAB \ X12 @ \ XF4 \ XCE \ XFE \的Xaa \ X96&安培; \ xe0 \ X93 \ X10 \ XBF \ xe6d \ X98 \ xf26 \ XFF \ XA0 ]/\xf9\x08\x10\x04HW/\xe7\x10,\x05\xbf\xf7/\xffc\x7f\xf2\x0f\xf9\x1a\x14\xff\xec\x0e\r\xbf\xff\xe3\x18\xc4\x7f\x11\xc1z\xbc\x01\xd28\x00\xea\x1c\x81:%\x9a\xfa\xa8\x19\x89 RK \ xa5 \ XD6 \ XAB \ xc7 \ xc1x \ X01 \ X84 \ x82Q \固定的\ XF4 \ X1C \ X11 \ X04 \ x91 \ xa9 \ x16 \ xf9 \ x828 \ xbc \ x16 \ tbI \ x14 \ xfa \ x18 \ xc7 \ x91 \ xcb \ x92H \ xe3 \ x92 \ x0e \ xbf \ xf5(&lt; \ xb2 \ xfd \ x06M \ XFF \ XE3 \ X18 \ xc4s \ x0cb \ X16 \ XD4 \ x00SDp \ XE4 \ X02 \ xa8 \ xd9 \ x1a7 \ X98 \ X18 \ x8e0 \ x8b \ X90 \ XCD \ x9b \ XBA \ XEB \ X0C \ XC4 \ X13 \ XB7 \ xd2T + \ x01Dzt \ XEE \ xa8P @ \ X05 \ xe8 \ XB2 \ XCF \ XE1 \ X95 \ xdbKu \ xbb` \ X00] \ xd3O \固定的\ xa5 \ XD2 \ X92 \ x80If \ X95 \ XCD \ XF8 \ xe5C \ XA0 \ XFF \ XE3 \ X18 \ XC4 |!\ X0C \ xb9j \ XCC \ x00SNM \ xf8F \ xf9 \ xb5t \ X11 \ X80 \ X14 r \ XCD \ XFE} \ X10 \ x08R \ XFF \ xa8Q(\ XFF \ XA0 \ X10 \ XA0&安培; \ xe8 \ XFF \ XE2 \ x8a \ X11 \的Xaa \ 0x7F部分\ XFC \ xffR \ XB1 \ X94 \ xbdf3 \ XAB \ X14 \ xa1L [uF的\ xd6R \ x95o \ XFF \ XEF \ xa1U \ X99 \ XBD {\ xfd的\ XFF \ XE3 \ X18 \ XC4 \ X84 \ X0C \ XA1 \ XE6 @ KTL?\ xfd的\ xd2b \ xb1h \ xe6GG \ XAB \ X14 \ xa5 \ XBB \ XBA \ x0eYN \ xb9_ \ XA2 \ X01 \ X04 \ x98b \ XFF \的x87 \ XFF \ x14O \ xfdHX \ xc7 \ XFF \ XF2 \ xb0x \ XB3 * \ 0x7F部分\ XFF \ XA3%\的Xaa $ \ X06 \ X0F \'\ XFF \ xff1 \ xa8 \ XE6 #\ xa29 \ 0x7F部分\ XFF \ XFF \ XFF \ XE3 \ X18 \ XC4 \ x8c \ r \吨\'\ x1eXb \ x04N \ xccckU 1 \ XB4 \ xff_ \ XFF \ xfeb \ XA0 \ xf5Ac \ x8e_ \ XAE / LAME3.99.5UUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ X92 \ X0B \ XF1 \ XEA \ XB4 \ xc9B \ X10 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3。 99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ x9d \ x0e {\ X12 \ X84)\ X81(\ x02UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ x9e \ X00 \ X00 \ x03H \ X01 \ XC0 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUU UUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.99.5UUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU \ XFF \ XE3 \ X18 \ XC4 \ XC4 \ X00 \ X00 \ x03H \ X00 \ X00 \ X00 \ x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'

0 个答案:

没有答案