Generador de audio
Este es unAI, Marketingflujo de automatización del dominio deautomatización que contiene 12 nodos.Utiliza principalmente nodos como Set, Aggregate, GoogleDrive, ManualTrigger, ReadWriteFile, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Usar un modelo Bark autohospedado y Google Drive para generar audio a partir de guiones de texto
- •Credenciales de API de Google Drive
Nodos utilizados (12)
Categoría
{
"id": "oGZBcAWL45us8pwq",
"meta": {
"instanceId": "b056f9b68a026cea4ea6d6cda333d4e0637787dd2b6ca0bc03505f1e16cc8372",
"templateCredsSetupCompleted": true
},
"name": "Audio generator",
"tags": [],
"nodes": [
{
"id": "90a47429-775e-43d5-acfb-b7f72f382894",
"name": "Inicio: Activador Externo",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
300,
80
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "id_repo_audio"
},
{
"name": "id_repo_script"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "415fa2d1-532f-4a46-8634-8099f820816e",
"name": "Inicio: Prueba Manual",
"type": "n8n-nodes-base.manualTrigger",
"position": [
200,
440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "627fad9c-407d-496a-b0ff-5b58055c666c",
"name": "Valores de Prueba",
"type": "n8n-nodes-base.set",
"position": [
420,
440
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"name": "id_repo_audio",
"type": "string",
"value": "1wrnIskVWQJRAvKs04bhXavgDv2FokabG"
},
{
"name": "id_repo_script",
"type": "string",
"value": "12tIJJuO_DfwJbtOuO72mpk2_3s9O4xZc"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e0efd839-dc9e-4d0b-b602-a6ead9e8d679",
"name": "Agregar Entradas",
"type": "n8n-nodes-base.aggregate",
"position": [
560,
80
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "id_repo_audio"
},
{
"fieldToAggregate": "id_repo_script"
}
]
}
},
"typeVersion": 1
},
{
"id": "fea5d345-4d72-431d-bf9b-4165b9b6f605",
"name": "Obtener Guiones",
"type": "n8n-nodes-base.googleDrive",
"position": [
820,
80
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Aggregate Inputs').item.json.id_repo_script[0] }}"
}
},
"options": {},
"resource": "fileFolder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "m7YYCMskvr7bsiei",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "0fccfd48-ca42-45ea-9eb0-75f49f4572f6",
"name": "Bucle de Guiones",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1140,
80
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "ba6ea0f9-d1d7-4f22-a817-764335132a1c",
"name": "Descargar Guion",
"type": "n8n-nodes-base.googleDrive",
"position": [
1500,
100
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "m7YYCMskvr7bsiei",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "f0f95702-4636-4810-9e42-4b3af5c13d9a",
"name": "Guardar Guion",
"type": "n8n-nodes-base.readWriteFile",
"position": [
1780,
100
],
"parameters": {
"options": {},
"fileName": "/tmp/script.txt",
"operation": "write",
"dataPropertyName": "=data"
},
"typeVersion": 1
},
{
"id": "63cb6eb3-6693-4b34-84c9-4f6b39872752",
"name": "Generar WAV",
"type": "n8n-nodes-base.executeCommand",
"position": [
2000,
100
],
"parameters": {
"command": "=/opt/venv/bin/python /scripts/generate_voice.py /tmp/script.txt /tmp/output_{{ $json.name.replace(/\\.txt$/, '') }}.wav"
},
"typeVersion": 1
},
{
"id": "0d29f755-5ed2-4005-9eed-acbc9c8ff8d1",
"name": "Leer Audio",
"type": "n8n-nodes-base.readWriteFile",
"position": [
2220,
100
],
"parameters": {
"options": {},
"fileSelector": "=/tmp/output_{{ $('Loop Scripts').item.json.name.replace(/\\.txt$/, '.wav') }}"
},
"typeVersion": 1
},
{
"id": "394dead9-49af-4187-a589-1ff751e998f8",
"name": "Subir Audio",
"type": "n8n-nodes-base.googleDrive",
"position": [
2440,
100
],
"parameters": {
"name": "={{ $json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Aggregate Inputs').item.json.id_repo_audio[0] }}"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "m7YYCMskvr7bsiei",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "95f7b0e0-980f-4beb-adac-197b4b50a84f",
"name": "📝 Instrucciones del Flujo de Trabajo",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
260
],
"parameters": {
"width": 600,
"height": 400,
"content": "## Audio Generation Workflow\n\n1. This workflow automates the conversion of text scripts into audio files using a Python voice synthesis script.\n2. It retrieves scripts from Google Drive, generates audio with Bark-style narration, and reuploads the result.\n3. Script filenames must be .txt. Only clean plain text is supported.\n\n### Inputs:\n- id_repo_script: Google Drive folder with scripts\n- id_repo_audio: Google Drive folder to upload audio files\n\nMake sure the Python script is deployed at /scripts/generate_voice.py and has access to Bark or other required models."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "30318ca0-c87d-43db-8b74-3ec1127e1061",
"connections": {
"0d29f755-5ed2-4005-9eed-acbc9c8ff8d1": {
"main": [
[
{
"node": "394dead9-49af-4187-a589-1ff751e998f8",
"type": "main",
"index": 0
}
]
]
},
"fea5d345-4d72-431d-bf9b-4165b9b6f605": {
"main": [
[
{
"node": "0fccfd48-ca42-45ea-9eb0-75f49f4572f6",
"type": "main",
"index": 0
}
]
]
},
"f0f95702-4636-4810-9e42-4b3af5c13d9a": {
"main": [
[
{
"node": "63cb6eb3-6693-4b34-84c9-4f6b39872752",
"type": "main",
"index": 0
}
]
]
},
"627fad9c-407d-496a-b0ff-5b58055c666c": {
"main": [
[
{
"node": "e0efd839-dc9e-4d0b-b602-a6ead9e8d679",
"type": "main",
"index": 0
}
]
]
},
"63cb6eb3-6693-4b34-84c9-4f6b39872752": {
"main": [
[
{
"node": "0d29f755-5ed2-4005-9eed-acbc9c8ff8d1",
"type": "main",
"index": 0
}
]
]
},
"0fccfd48-ca42-45ea-9eb0-75f49f4572f6": {
"main": [
[],
[
{
"node": "ba6ea0f9-d1d7-4f22-a817-764335132a1c",
"type": "main",
"index": 0
}
]
]
},
"394dead9-49af-4187-a589-1ff751e998f8": {
"main": [
[
{
"node": "0fccfd48-ca42-45ea-9eb0-75f49f4572f6",
"type": "main",
"index": 0
}
]
]
},
"ba6ea0f9-d1d7-4f22-a817-764335132a1c": {
"main": [
[
{
"node": "f0f95702-4636-4810-9e42-4b3af5c13d9a",
"type": "main",
"index": 0
}
]
]
},
"e0efd839-dc9e-4d0b-b602-a6ead9e8d679": {
"main": [
[
{
"node": "fea5d345-4d72-431d-bf9b-4165b9b6f605",
"type": "main",
"index": 0
}
]
]
},
"415fa2d1-532f-4a46-8634-8099f820816e": {
"main": [
[
{
"node": "627fad9c-407d-496a-b0ff-5b58055c666c",
"type": "main",
"index": 0
}
]
]
},
"90a47429-775e-43d5-acfb-b7f72f382894": {
"main": [
[
{
"node": "e0efd839-dc9e-4d0b-b602-a6ead9e8d679",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Inteligencia Artificial, Marketing
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Flavien
@flavienCompartir este flujo de trabajo