{
  "title": "Dialogue from PDF",
  "video_id": "h0XffHCcfyE",
  "published": "2023-10-14T14:17:24+0000",
  "complexity": "Complex",
  "old_url": "https://workflows-of-ai.com/workflow/dialogue-pdf",
  "description": "Turn a PDF into a two-person audio dialogue in Drupal: extract the text, write the dialogue with OpenAI, voice it with ElevenLabs, join it with FFmpeg.",
  "subtitle": "Upload a PDF and get back one MP3 of two voices discussing it, built with OpenAI, ElevenLabs and FFmpeg.",
  "summary": "A PDF about posture is uploaded and its text extracted with the Text from document rule. GPT-4 writes a short dialogue between an interviewer and an expert, and the ElevenLabs field voices each line, one of them with a cloned voice of Marcus. A last file field joins the clips into one MP3 with FFmpeg.",
  "categories": [
    "Drupal AI"
  ],
  "intro_html": "<p>The combination of ConvertAPI, OpenAI, ElevenLabs and FFmpeg modules enables a multi-step transformation of a PDF into an audio dialogue. Initially, the ConvertAPI module is used to transform the PDF content into text. This extracted text, now in a readable and editable format, serves as the base material for the next steps.</p><p>With the text extracted, it is then processed through the AI Interpolator OpenAI module, which transforms the content into a dialogue format. OpenAI structures the text into an interactive conversation, making it more engaging and dynamic.</p><p>The newly created dialogue is then fed into the ElevenLabs field module. ElevenLabs converts the dialogue into an audio file, providing an audio version of the conversation. However, to refine and finalize the audio file, it is then processed through FFmpeg. This additional step makes sure the audio quality is optimized and the file is in the desired audio format, ready for listening. The end result is an accessible, audible conversation made from the original PDF content.</p>",
  "intro_added": false,
  "chapters": [
    "0:00 From PDF to spoken dialogue",
    "1:11 Creating the Dialogue content type",
    "2:33 Extracting text from the PDF",
    "3:06 The ElevenLabs dialogue field",
    "3:58 Voices and the dialogue prompt",
    "5:49 Joining the clips into one MP3",
    "7:02 Running it on a PDF",
    "7:49 Plans for a one-click setup",
    "8:33 Listening to the result"
  ],
  "corrections": [
    [
      "ffmpeg",
      "FFmpeg"
    ],
    [
      "11 Labs",
      "ElevenLabs"
    ],
    [
      "druple",
      "Drupal"
    ],
    [
      "open AI",
      "OpenAI"
    ],
    [
      "gp4 creates",
      "GPT-4 creates"
    ],
    [
      "this Ocean",
      "DigitalOcean"
    ],
    [
      "MP fre",
      "MP3"
    ]
  ],
  "ai_note": "The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions."
}