---
title: "Dialogue from PDF"
video_id: h0XffHCcfyE
url: https://www.youtube.com/watch?v=h0XffHCcfyE
workflow_page: https://workflows-of-ai.com/workflow/dialogue-pdf
language: en
captions: generated
---

0:00 hey there uh Marcus here uh today we're
0:03 going to do a workflow that's pretty
0:05 complex so what we're going to do is
0:07 we're going to upload a
0:09 PDF uh this one about uh fixing the
0:12 computer guy posture something every
0:14 developer should read by the way uh and
0:17 we're going to uh generate a dialogue
0:21 about it in uh actual people talking
0:25 right about it and not just one person
0:28 saying the text in here but we're
0:30 actually going to create a dialogue
0:31 where they are discussing
0:34 it um as always this is Drupal Drupal is
0:38 open source uh I have installed AI
0:40 interpolator modules otherwise it's
0:42 completely vanilla what I have running
0:44 on here as well on this lamp service FFM
0:47 Peg and this is a requirement for one of
0:49 the steps that I'm going to show now uh
0:52 so this is a little bit more complex but
0:54 you're still not going to need any
0:55 coding to set this up everything is open
0:59 source uh free to use free to create
1:02 products out of if you want
1:05 um yeah if you find bugs please let me
1:08 know so we start by logging
1:11 in uh and then we uh create a content
1:16 type we're going to create that content
1:18 type called the
1:21 dialogue um so this is a typical
1:24 workflow for the CMS part of uh Drupal
1:27 that's more Drupal is a Content
1:28 management framework you don't
1:30 necessarily need to use it for uh as a
1:33 Content management system that's why it
1:35 was very good to actually create the AI
1:38 interpolator so the whole idea of
1:41 chaining fields to Fields because druple
1:44 is very powerful when it comes to
1:46 this uh so I am using nodes now to be
1:49 able to show the GUI part of it if you
1:51 ever create a product make sure that you
1:52 create it in uh uh like a a custom
1:56 entity type also so you know you can
1:58 create this using a API so if you don't
2:00 like druple you can set up the chaining
2:03 here but then you can have a API call to
2:05 upload the PDF and API call to download
2:09 the MP3 basically we're going to remove
2:12 the body field because that's a typical
2:14 CMS field we don't need but a field we
2:16 do need is a file field because we need
2:20 to upload a PDF right that's where
2:23 everything starts it's just going to be
2:26 one file we need to require it because
2:29 without it we can't do anything and it
2:31 should be a
2:33 PDF uh the next step is that we need to
2:36 scrape this PDF and get text from it so
2:40 we have something to feed open AI to
2:42 create a dialogue should just be one as
2:45 well we can do full HTML and here we
2:46 enable the AI interpolator then use the
2:49 rule text from document so that takes u
2:53 a document and creates text from it we
2:55 use the base mode and the PDF file uh
2:58 turn on batch mode so we can see that
2:59 the
3:01 progress uh Next Step then is
3:06 uh uh let me think we need to create 11
3:09 Labs field so that's the
3:11 dialogue
3:14 dialog oh I had it
3:16 therea
3:18 um and this has to be unlimited because
3:21 that's uh for each person speaking it
3:24 will create one field right so if we
3:26 want them to speak back and forth you
3:28 have to have well you don't have to have
3:30 unlimited but you can't have one field
3:31 at least and we enable the AI
3:34 interpolator use the 11 lab styo Creator
3:37 rule base mode we're going to use the
3:39 PDF text as the
3:41 context and I'm just going to inspect
3:43 here and steal that um steal that
3:47 placeholder because it's pretty
3:49 good oh we don't need the HTML though
3:53 right so we just remove here so we're
3:58 going to have the interviewer mark
4:00 Johansson so that's
4:02 me uh be very aware though that my
4:06 learned voice is not super great I sound
4:08 Dutch for whatever
4:10 reason so uh I should spend more time
4:13 actually teaching the voice but it's
4:15 just so so you see that you can actually
4:17 uh use your own voices as well in this
4:20 so 11 Labs uh allows you to upload MP3
4:23 file of you talking and it creates your
4:26 voice from this so we're going to do
4:28 this this based on context create a
4:30 dialogue between podcast interviewer
4:34 well it doesn't need to be a podcast
4:35 right but whatever who is the fun loving
4:37 character and UL typ who is a serious
4:39 guest expert on the topic so she's going
4:42 to know everything about this document
4:44 then is the
4:45 idea uh start with introduction and
4:48 create oh create I'm just going to do
4:51 three dialogues back and forth because
4:52 this takes for really takes a long time
4:56 first of all for open AI to create the
4:58 dialogue but 11 Labs I should create the
5:01 audio and then the 11 Labs voices to you
5:05 so we have Marcus Johansson here instead
5:08 right um and in the placeholders you can
5:12 find all the voices so there is you can
5:14 see here there is a Marcus Johansson
5:16 instead and for Julia stes we can take
5:21 Susan so that's American J girl voice I
5:24 think context is the context so that's
5:26 the PDF text
5:28 right uh we have to set the interpolator
5:30 way higher because otherwise of course
5:34 uh we run into uh we can run into the
5:38 text not existing before we have to
5:41 create this batch mode gp4 creates
5:44 better
5:45 stuff
5:49 save then we're going to do one more
5:51 thing and create another field because
5:54 the thing is the 11 Labs field it will
5:56 create One MP3 per d I mean per person
6:01 saying something and that we can't use
6:03 if we just want to provide One MP3 for
6:05 everyone so you can play that on the
6:07 website but if you're using it for a
6:10 process where you don't actually want
6:11 the website to be the end station right
6:14 um then you might want to mix this so we
6:19 just create a file field called
6:27 audio should just have one field
6:33 MP3 save this and if we go back to
6:36 dialogue now then there was a option
6:38 that you saw before maybe if you looked
6:40 quickly there is resaving audio field we
6:42 say this and we say conen it so we're
6:45 going to take all this dialogues and
6:47 just create One MP3 you can see we can
6:50 have intros outros soundscapes and mix
6:52 it as well but we don't do that
6:56 now save this and we're going to create
6:58 the content
7:02 so we call this back back pan upload the
7:07 file uh this one stretches PDF and this
7:11 is going to fill out everything and and
7:13 in the end hopefully create the audio
7:16 then and now this is going to take some
7:18 time so the first process of uh
7:20 generating text from PDF that's very
7:22 fast but the second one where we're
7:24 actually asking open AI to create the
7:26 dialogue and then you're writing all the
7:28 MP fre and then well the last part of
7:32 concatenating that's very quick because
7:35 it's audio video can take some time but
7:37 audio is very very
7:39 quick
7:42 um so this yeah it will take some
7:46 time
7:49 um I can say while we're waiting I'm
7:53 probably going to uh set up
7:57 some uh images in this Ocean or Amazon
8:00 where you can actually copy this image
8:03 to get uh a like a a Drupal profile that
8:08 has all the AI interpolator and
8:10 everything installed so you it's just
8:12 going to be one click set up and if I
8:15 ever have the time to do this I will
8:18 make sure that ffmpeg is installed so
8:20 you can use this part as well there will
8:23 probably be AI interpolators for video
8:26 in the future where anyway it makes a
8:28 lot of sense to have have ffmpeg install
8:30 because it's extremely powerful tool
8:32 when it comes to
8:33 Media so now it's finished so we have
8:37 the PDF we have the text from the
8:39 PDF we have a virtual player that we
8:42 could play but that is basically playing
8:44 One MP3 after the other but it has
8:46 created MP3 here as well so now we're
8:48 going to listen to this so the next
8:51 audio you hear now and you're going to
8:53 hear it's not really me but it's not
8:55 going to be me talking but the virtually
8:58 hello and welcome to the show Julia how
9:00 are you doing today thank you Marcus I'm
9:03 doing well ready to tackle the issues
9:05 related to posture and lower backage hip
9:07 stability excellent it's it's such a
9:10 common problem so tell me Julia why is
9:14 it a mistake for people to think that
9:16 working out hard in the gym will fix
9:18 their bad posture well Marcus the gym
9:21 only cements what you have if you have
9:23 the bad posture heavy lifting can
9:25 actually make it worse if you have good
9:27 posture heavy lifting can enhance it but
9:30 of course there are exceptions
9:32 interesting and what about the common
9:34 posture dysfunction the anterior pelvic
9:37 tilt how can we recognize and correct
9:41 this issue you can check by looking at
9:43 your belt or from a side profile in the
9:45 mirror if it's tilted down or your butt
9:47 sticking out chances are you have it
9:50 correcting it involves several steps
9:52 from lengthening the hip flexors
9:54 strengthening glutes and finally lower
9:57 back stretching and strengthening abs
9:59 I see that's enlightening um thank you
10:02 so much for your insights today
10:05 Julia yeah as you can hear my voice is
10:07 not that great so you can use two
10:11 professional voice actors and it's going
10:12 to be very much better result or train
10:15 on a voice actor's voice
10:17 then uh but that's it uh we have a audio
10:20 file from a PDF uh of people talking
10:24 about the
10:25 PDFs um yeah thank you for watching
