オーディオジェネレーター

中級

これはAI, Marketing分野の自動化ワークフローで、12個のノードを含みます。主にSet, Aggregate, GoogleDrive, ManualTrigger, ReadWriteFileなどのノードを使用、AI技術を活用したスマート自動化を実現。 自ホストBarkモデルとGoogle Driveを使用してテキストスクリプトから音声を生成

前提条件
  • Google Drive API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "oGZBcAWL45us8pwq",
  "meta": {
    "instanceId": "b056f9b68a026cea4ea6d6cda333d4e0637787dd2b6ca0bc03505f1e16cc8372",
    "templateCredsSetupCompleted": true
  },
  "name": "Audio generator",
  "tags": [],
  "nodes": [
    {
      "id": "90a47429-775e-43d5-acfb-b7f72f382894",
      "name": "開始: 外部トリガー",
      "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": "開始: 手動テスト",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        200,
        440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "627fad9c-407d-496a-b0ff-5b58055c666c",
      "name": "テスト値",
      "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": "入力の集約",
      "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": "スクリプト取得",
      "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": "スクリプトループ",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1140,
        80
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "ba6ea0f9-d1d7-4f22-a817-764335132a1c",
      "name": "スクリプトダウンロード",
      "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": "スクリプト保存",
      "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": "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": "オーディオ読み込み",
      "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": "オーディオアップロード",
      "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": "📝 ワークフロー説明",
      "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
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - 人工知能, マーケティング

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数12
カテゴリー2
ノードタイプ9
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34