Hi!
I’m trying to build a workflow using the gpt-4o-transcript-diarize model.
Here is my workflow:
Workflow
{
“nodes”: [
{
“parameters”: {
“operation”: “download”,
“fileId”: {
“__rl”: true,
“value”: “1iAuzrKOgSSNrBMFqvlxLCyGM7xd3VN3V”,
“mode”: “list”,
“cachedResultName”: “podcast-small.mp3”,
“cachedResultUrl”: “https://drive.google.com/file/d/1iAuzrKOgSSNrBMFqvlxLCyGM7xd3VN3V/view?usp=drivesdk”
},
“options”: {}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-9952,
3968
],
“id”: “fc3dc9cf-d83f-43f4-9ad7-757f2bc245a5”,
“name”: “Download file”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “1DSts6VwCFDypddE”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-10176,
3968
],
“id”: “c77b5edb-3d4f-4f76-873c-003f3841d732”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.openai.com/v1/audio/transcriptions”,
“authentication”: “predefinedCredentialType”,
“nodeCredentialType”: “openAiApi”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Content-Type”,
“value”: “multipart/form-data”
}
]
},
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“parameterType”: “formBinaryData”,
“name”: “file”,
“inputDataFieldName”: “data”
},
{
“name”: “model”,
“value”: “gpt-4o-transcribe-diarize”
},
{
“name”: “response_format”,
“value”: “diarized_json”
},
{
“name”: “chunking_strategy”,
“value”: “auto”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.3,
“position”: [
-9744,
3968
],
“id”: “18914937-647c-4313-8cb3-dd53190fbe91”,
“name”: “HTTP Request”,
“credentials”: {
“openAiApi”: {
“id”: “gIEXkAU0PSOSYw0O”,
“name”: “jmolla-conseil OpenAI account”
}
}
}
],
“connections”: {
“Download file”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “Download file”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateId”: “5926”,
“templateCredsSetupCompleted”: true,
“instanceId”: “4705317590c6fb9acdc9f546653b0184937f6de44de466c5564912c44810a259”
}
}
The mp3 file is working well on my computer so I don’t know why the API says it is corrupted:
400 - "{\n \"error\": {\n \"message\": \"Audio file might be corrupted or unsupported\",\n \"type\": \"invalid_request_error\",\n \"param\": \"file\",\n \"code\": \"invalid_value\"\n }\n}"
And here is the mediainfo (mediainfo podcast-small.mp3) :
General
Complete name : podcast-small.mp3
Format : MPEG Audio
File size : 21.7 MiB
Duration : 1 h 34 min
Overall bit rate mode : Constant
Overall bit rate : 32.0 kb/s
Writing library : LAMEU7Audio
Format : MPEG Audio
Format version : Version 2
Format profile : Layer 3
Duration : 1 h 34 min
Bit rate mode : Constant
Bit rate : 32.0 kb/s
Channel(s) : 1 channel
Sampling rate : 16.0 kHz
Frame rate : 27.778 FPS (576 SPF)
Compression mode : Lossy
Stream size : 21.7 MiB (100%)
Writing library : LAMEU7
Any idea?
Thanks!