Commit e58e806
committed
Fix jigsawstack-python.tts:
1. The bug stems from line 59 of jigsawstack.request.Request class, where the method perform verifies the response headers.
2. The response headers are useful for us to determine type of content received from the api as response.
3. Previously, Request.perform()::line 59 would accept a response of application/json type, or raise an "parsing" error otherwise.
4. Fix applied: Updated the boolean check to accept audio/wav.
5. Clarification: In JavaScript, a Blob represents raw binary data as a file-like object. In Python, binary responses (like audio data) are typically handled as a bytes object.
6. The response has to be written to a file :)1 parent cf4c340 commit e58e806
2 files changed
+4
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
This file was deleted.
0 commit comments