Hi,
I’m encountering an issue with the Speech-to-Text API where it seems like the server is interpreting a boolean parameter as a string, resulting in a 400 Bad Request error.
Here’s the relevant snippet of my code:
from jigsawstack import JigsawStack
jigsaw = JigsawStack()
params = {
"file_store_key": "tmp.mp3",
"language": "it",
"by_speaker": True, # Boolean value passed here
}
response = jigsaw.audio.speech_to_text(params)
When I make a POST request to the /ai/transcribe endpoint with the above parameters, I get the following error response:
{
"error": [
{
"code": "invalid_type",
"path": [
"by_speaker"
],
"message": "Expected boolean, received string",
"expected": "boolean",
"received": "string"
}
],
"message": "Bad request",
"success": false
}
I’ve double-checked my code, and I am passing by_speaker as a boolean (True). However, the server seems to be interpreting it as a string instead.
Additional Server Log Details:
- API Endpoint: https://api.jigsawstack.com/v1/ai/transcribe
- Query Parameters: file_store_key=tmp.mp3&language=it&by_speaker=true
- HTTP Method: POST
- Response Status: 400 Bad Request
- Content-Type: application/json
- Auth Method: API Key
- Agent: python-requests/2.32.3
Thank you for looking into this!
Hi,
I’m encountering an issue with the Speech-to-Text API where it seems like the server is interpreting a boolean parameter as a string, resulting in a 400 Bad Request error.
Here’s the relevant snippet of my code:
When I make a POST request to the /ai/transcribe endpoint with the above parameters, I get the following error response:
{ "error": [ { "code": "invalid_type", "path": [ "by_speaker" ], "message": "Expected boolean, received string", "expected": "boolean", "received": "string" } ], "message": "Bad request", "success": false }I’ve double-checked my code, and I am passing by_speaker as a boolean (True). However, the server seems to be interpreting it as a string instead.
Additional Server Log Details:
Thank you for looking into this!