1
00:00:00,120 --> 00:00:00,870
Hello, everyone.

2
00:00:01,380 --> 00:00:07,470
Now, in this section, I will show you how you can take a video if you have to open it, then instruct

3
00:00:07,470 --> 00:00:09,250
the text from any page.

4
00:00:10,110 --> 00:00:13,800
So the first thing you have to do is to have a PDF.

5
00:00:13,800 --> 00:00:19,430
So which which is a book or something like that that you want to read it or you want to listen it.

6
00:00:19,920 --> 00:00:23,310
So I will take this video, for example.

7
00:00:24,480 --> 00:00:30,760
There is two ways you can put the video directly in the same direction where you are saving your life

8
00:00:30,760 --> 00:00:36,740
online, or you can put it anywhere you want, but it will differ in the program.

9
00:00:36,750 --> 00:00:43,230
I will show you how you can do that, because if you want to open a PDF, you need to give the path

10
00:00:43,230 --> 00:00:44,230
of this video.

11
00:00:44,430 --> 00:00:51,420
So if you are, you are saving the video at the same park where you are saving your life on fire.

12
00:00:51,690 --> 00:00:52,620
It will be easy.

13
00:00:52,950 --> 00:01:00,810
But if you are not saving the period at the same path or at the same folder where you are saving your

14
00:01:00,810 --> 00:01:01,540
bike on fire.

15
00:01:01,770 --> 00:01:09,510
So you need to take the entire path, for example, from your desktop to the folder to the video, for

16
00:01:09,510 --> 00:01:09,950
example.

17
00:01:10,800 --> 00:01:17,700
But if you wanted to be very easy, you have just to take the video and put it at the same path or at

18
00:01:17,700 --> 00:01:23,130
the same folder where you are saving your for your patient file folder.

19
00:01:23,550 --> 00:01:28,600
For the moment you are saying this, but after that one, we will create our application.

20
00:01:28,620 --> 00:01:35,070
You don't need this anymore because you will choose your video by clicking the button so you don't need

21
00:01:35,070 --> 00:01:37,260
to give the part in the program.

22
00:01:37,260 --> 00:01:38,770
You will choose it by yourself.

23
00:01:39,060 --> 00:01:46,340
So just for this section, I am saying that just to say to see how to instruct the text from any video,

24
00:01:46,680 --> 00:01:50,250
but in the next sections we will create our application.

25
00:01:50,260 --> 00:01:53,690
So you don't need to take the path manually.

26
00:01:53,700 --> 00:01:56,250
So we will take it after you will choose it.

27
00:01:56,250 --> 00:01:56,730
Absolutely.

28
00:01:56,940 --> 00:01:57,630
In the button.

29
00:01:57,660 --> 00:01:58,920
That will open the video.

30
00:01:58,980 --> 00:02:06,710
OK, so now here here is our previous program that we used.

31
00:02:06,720 --> 00:02:16,170
So I would just take this or I will give it a comment here so that we will we want this again now to

32
00:02:16,170 --> 00:02:17,070
do this.

33
00:02:17,070 --> 00:02:24,590
We need to import the library that help us to manipulate the media file.

34
00:02:24,870 --> 00:02:29,110
So we have installed it in the first section.

35
00:02:29,400 --> 00:02:39,900
So this this library called by the tree where it is the tool sorry, this one by the F2.

36
00:02:40,170 --> 00:02:43,670
So this library will help us to manipulate our PDA.

37
00:02:43,680 --> 00:02:50,950
So we have just import it so that you can use any function of the included in this library.

38
00:02:50,970 --> 00:02:55,950
So after importing it, what we need to do is just to write our program.

39
00:02:56,160 --> 00:02:58,420
You will see that it is easy as this one.

40
00:02:58,710 --> 00:03:02,350
So the first thing we have to open the video of.

41
00:03:02,850 --> 00:03:05,280
So I will put some comments.

42
00:03:05,640 --> 00:03:11,070
So we have to open the video of what I am right.

43
00:03:12,770 --> 00:03:19,130
Then we need to after opening it, we need to read it.

44
00:03:19,140 --> 00:03:27,420
So to do this, we have to read the the if after reading the video, we we need to choose the page that

45
00:03:27,420 --> 00:03:29,530
we want to take the text from it.

46
00:03:29,880 --> 00:03:42,270
So here the choosing the page that we want to, to read it or to listen.

47
00:03:43,350 --> 00:03:47,970
Then here after reading the text we have to extracted

48
00:03:51,300 --> 00:03:55,710
from the page, then after taking the text from the page, from

49
00:03:58,260 --> 00:04:05,610
then after taking the text from the page, we need to to print it or to say it or something like this.

50
00:04:05,620 --> 00:04:08,460
So I will just add this comment.

51
00:04:08,460 --> 00:04:14,000
For example, frames the text from the page like this.

52
00:04:14,430 --> 00:04:21,000
Now, after doing this, what we have we will start by this one, open the PDF to open the PDA.

53
00:04:21,040 --> 00:04:23,010
There is a function called open.

54
00:04:23,400 --> 00:04:24,930
It is not included in this one.

55
00:04:24,930 --> 00:04:26,190
It is included in Python.

56
00:04:26,430 --> 00:04:33,400
So we will take the PDA, but before that, we need to put it in a variable so that we can use it after.

57
00:04:33,720 --> 00:04:37,880
So I will give it, for example, book the this variable called the book.

58
00:04:38,190 --> 00:04:46,170
So it will open this function open and inside the buttons is there is two parameters that we need to

59
00:04:46,170 --> 00:04:46,350
do.

60
00:04:46,350 --> 00:04:51,550
The first parameter is the path where we are using we are putting our PDA.

61
00:04:51,900 --> 00:04:53,840
So that's what I was talking about.

62
00:04:54,030 --> 00:04:59,480
So the first thing that we have to give in this parameters or in.

63
00:05:00,240 --> 00:05:04,420
Or between this and this is is the birth of our year.

64
00:05:04,710 --> 00:05:11,970
So in this case, we have the belief in the same folder where we are saving our Biton file.

65
00:05:12,270 --> 00:05:14,390
So we don't need to give it any path.

66
00:05:14,400 --> 00:05:20,410
We need to give it just the name of the PDF because the first path does it, we search for it.

67
00:05:20,410 --> 00:05:23,670
It is the same path that we are saving our pithier.

68
00:05:23,910 --> 00:05:33,510
So if we are saving the title, I mean that means that if we are saving the PIDF at the same folder,

69
00:05:33,580 --> 00:05:36,680
we are saving the PDF, the fight on file.

70
00:05:36,690 --> 00:05:40,340
So in this case, it doesn't need any other parts.

71
00:05:40,590 --> 00:05:44,850
So I will, if we want to, right the path we need to put it inside this one.

72
00:05:45,270 --> 00:05:46,450
So quotation marks.

73
00:05:46,450 --> 00:05:52,740
So here what we need to write between the quotation marks, just the name of our period, then the extension

74
00:05:52,740 --> 00:05:53,740
of our video.

75
00:05:54,050 --> 00:05:56,630
So as you can see here, named book.

76
00:05:56,940 --> 00:06:00,870
So we have just to write a book, does we of like this.

77
00:06:01,440 --> 00:06:08,460
This one is the first parameter and there is another parameter for this function, which is what we

78
00:06:08,460 --> 00:06:09,830
want to do with this video.

79
00:06:09,920 --> 00:06:13,320
We want to read it or we want to write it or we don't know.

80
00:06:13,680 --> 00:06:16,220
So in this case, we want to read the pedia.

81
00:06:16,350 --> 00:06:21,520
So we want to take the video from the folder and enter it in our program, then work with it.

82
00:06:21,840 --> 00:06:23,010
So we want to read it.

83
00:06:23,250 --> 00:06:33,630
So we will take a full read then how in what's in what type of variables or in what type of data we

84
00:06:33,630 --> 00:06:34,300
want to read it.

85
00:06:34,590 --> 00:06:38,880
So in this case, we want to read it as binary, so we want to read it binary.

86
00:06:38,880 --> 00:06:43,930
So we have to read to write are for read then be for binary.

87
00:06:44,000 --> 00:06:46,140
OK, as you can see it is very easy.

88
00:06:46,140 --> 00:06:50,370
Biton we have open the name of the Piddled then read it as binary.

89
00:06:50,440 --> 00:06:56,930
OK, after opening our video I will just make space here after opening the book.

90
00:06:57,120 --> 00:06:59,060
What we need to do, we have to read it.

91
00:06:59,070 --> 00:07:00,660
So to read it I will give it.

92
00:07:00,660 --> 00:07:05,130
For example read file this.

93
00:07:05,550 --> 00:07:10,560
This is another variable that will take the file that we will read from the PDA.

94
00:07:10,830 --> 00:07:13,190
So here we open it now we will read it.

95
00:07:13,380 --> 00:07:19,140
So to read it, we have just to use a function that is already included in the library, which is by

96
00:07:19,160 --> 00:07:19,800
PDA too.

97
00:07:20,130 --> 00:07:25,980
So to call any function from this library, we need to tell you to type the name of the library.

98
00:07:26,460 --> 00:07:31,570
Then here that read file reader, this one.

99
00:07:31,590 --> 00:07:38,580
So this function will lead the PDA, then inside the parenthesis we have to give it a parameter.

100
00:07:38,760 --> 00:07:40,860
And what do you think here?

101
00:07:40,860 --> 00:07:42,120
We want to read a PDF.

102
00:07:42,130 --> 00:07:45,440
So in this case, you want to read, for example, in this book.

103
00:07:45,750 --> 00:07:47,930
So we have to put the name of the book.

104
00:07:47,940 --> 00:07:51,940
So we open it and put it in this function that will read it.

105
00:07:51,990 --> 00:08:00,120
OK, after reading the PDF, I will give a speech here after reading this the the idea of what we need

106
00:08:00,120 --> 00:08:06,690
to do, we have to choose a page that we want to read or we want to disrupt or something like this.

107
00:08:06,990 --> 00:08:12,710
So to do this, we have just for example, I will write I will create another variable called page.

108
00:08:13,110 --> 00:08:14,510
So page equal.

109
00:08:14,520 --> 00:08:23,520
Now, what we have to do, we have to write the opinion, which is read file, which is read file.

110
00:08:23,850 --> 00:08:28,840
We have we have to say read file because we have already read it here in this line.

111
00:08:28,860 --> 00:08:33,480
OK, here, this function, we read it, but the file reads file.

112
00:08:33,780 --> 00:08:40,420
Look, we have to say Ralphy because it will save the belief in that variable.

113
00:08:40,680 --> 00:08:46,320
So here we have read that file that the page, which is this one, gets page.

114
00:08:46,560 --> 00:08:48,990
So it get any page from our opinion.

115
00:08:49,380 --> 00:08:56,520
So in this case, for example, we take the the page six because it contains some sentence so that I

116
00:08:56,520 --> 00:09:00,810
would just say just for this example, but you can type any page you want.

117
00:09:01,500 --> 00:09:09,660
Now after taking this one, which is being read, read file, then that got to get a page.

118
00:09:09,990 --> 00:09:12,840
In this case, we have got the page that we want to read.

119
00:09:13,200 --> 00:09:17,190
After that, we need just to extract the text from that page.

120
00:09:17,250 --> 00:09:21,240
So to do this, we have just to write, for example, text or something like this.

121
00:09:22,170 --> 00:09:28,910
Don't worry about this text and the text, because if we will use this text here, this one will not.

122
00:09:29,730 --> 00:09:33,520
So this one will not take the role of this, for example.

123
00:09:33,540 --> 00:09:33,930
Hello.

124
00:09:33,940 --> 00:09:40,140
And something like this, the new the new variable or the new value of text will be here in this line.

125
00:09:40,170 --> 00:09:43,890
OK, so here we will give a text then.

126
00:09:43,890 --> 00:09:49,230
Here, what we have to do is to type the name or the name of the page that we have.

127
00:09:49,470 --> 00:09:54,150
Then that struct text, then we will extract the text from it.

128
00:09:54,600 --> 00:09:59,760
Then like this after extracting the text here, this variable text has.

129
00:09:59,890 --> 00:10:05,630
The text as streamed so we can print it, we can see it, we can do anything with it, so I only just

130
00:10:05,630 --> 00:10:10,890
print like this to say to see what we have in this country.

131
00:10:11,140 --> 00:10:14,770
So I will press from here.

132
00:10:14,770 --> 00:10:17,740
As you can see, here is the text that we have in that page.

133
00:10:18,400 --> 00:10:24,550
OK, so as you can see, there is not a lot of steps that we have to do.

134
00:10:24,550 --> 00:10:26,020
The first step is this one.

135
00:10:26,320 --> 00:10:31,150
We have to open the book as we read it as binary.

136
00:10:31,600 --> 00:10:38,860
Then we have to read file as PDF, which is here would open and that he will read it as a PDF like this

137
00:10:38,860 --> 00:10:40,950
read via video file reader.

138
00:10:41,470 --> 00:10:47,440
Then we have to put we have to choose the page from that video of this page because we want to say or

139
00:10:47,440 --> 00:10:52,990
want to read, then we need to instruct the text from that page.

140
00:10:53,270 --> 00:10:58,180
After that, we after after this step, we can we can do anything with this one.

141
00:10:58,180 --> 00:11:02,710
We can print it, we can say it or something like this.

142
00:11:02,890 --> 00:11:03,970
So it will stop here.

143
00:11:04,000 --> 00:11:10,660
And the next section, I will show you how you can make the program talking or I will make the program

144
00:11:10,660 --> 00:11:12,640
saying the words that are in the PDA.

145
00:11:13,210 --> 00:11:13,960
So while.
