0
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>H\x0c!@\x974O\xad4\xdc \xc0p\x06\xc1A)\xfc\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\x7f\ xccc\x0b\x01~\x8a\x16\xdf\xf5\xc9\x00\x1c-S\xbb\xeaTg\x01\xde%N\xad%l\x89&\n\xd8\xc0\t\x91j(\ xdbMD\x80r\x06\x15m\xfeH\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\xc3bp\xad\x08\x05\x19p\x90==n\xff\xe3\x18\xc4W\x00\x00\x03H\x01@\x00\x00\xf9\x996}<\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\xad?E\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~\xac\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\x18\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\x89rK\xa5\xd6\xab\xc7\xc1x\x01\x84\x82Q\xed\xf4\x1c\x11\x04\x91\xa9\x16\xf9\x828\xbc\x16\tbI\x14\xfa\x18\ xc7\x91\xcb\x92H\xe3\x92\x0e\xbf\xf5(<\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\xed\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\x7f\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 *\x7f\xff\xa3%\xaa$\x06\x0f\'\xff\xff1\xa8\xe6#\xa29\x7f\xff\xff\xff\xe3\x18\xc4\x8c\r\t\'\x1eXb\x04N\xccckU1\xb4\xff_\xff\xfeb\xa0\xf5Ac\x8e_\xae/LAME3.99.5UUUUUUUUUUULAME3.99.5UUUUUUUU\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\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.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\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'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\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xff\xe3\x18\xc4\xc4\x00\x00\x03H\x00\x00\ x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xff\xe3\x18\xc4\xc4\x00\x00\x03H\x00\x00\x00\x00UUUUUUUUUUUU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