Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rp_server_one
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ranasinghe R.A.P.T
rp_server_one
Commits
c2f6c991
Commit
c2f6c991
authored
Apr 25, 2022
by
Pamal-Ranasinghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basic translation app is done
parent
c624512c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
1 deletion
+26
-1
final_out.mp4
final_out.mp4
+0
-0
requirements.txt
requirements.txt
+0
-0
resources/__pycache__/speechExtraction.cpython-38.pyc
resources/__pycache__/speechExtraction.cpython-38.pyc
+0
-0
resources/wordsProcessModel.py
resources/wordsProcessModel.py
+26
-1
No files found.
final_out.mp4
0 → 100644
View file @
c2f6c991
File added
requirements.txt
View file @
c2f6c991
B
aniso8601
==9.0.1
...
...
resources/__pycache__/speechExtraction.cpython-38.pyc
View file @
c2f6c991
No preview for this file type
resources/wordsProcessModel.py
View file @
c2f6c991
from
nltk.tokenize
import
word_tokenize
from
loguru
import
logger
from
.awsOperation
import
AwsOperation
import
os
import
json
import
cv2
import
numpy
as
np
import
glob
from
moviepy.editor
import
*
class
WordModel
:
...
...
@@ -18,6 +22,8 @@ class WordModel:
try
:
logger
.
info
(
'word_pre_process - hits'
)
clip_arr
=
[]
# Identify all the takens
para_tokenize
=
word_tokenize
(
self
.
para
)
logger
.
info
(
'Tokenized Words : '
,
para_tokenize
)
...
...
@@ -33,6 +39,25 @@ class WordModel:
if
w
not
in
stop_words
:
filtered_sentence
.
append
(
w
)
aws
=
AwsOperation
(
'rpserverone'
)
bucket
=
aws
.
s3_connector
()
extension
=
".mp4"
# sign_names = ["this", "beautiful", "day"]
for
i
in
range
(
0
,
len
(
filtered_sentence
)):
print
(
type
(
i
))
print
(
str
(
filtered_sentence
[
i
])
+
extension
)
bucket
.
download_file
(
str
(
filtered_sentence
[
i
])
+
extension
,
'D:/s3_tute/'
+
str
(
filtered_sentence
[
i
])
+
extension
)
for
filename
in
glob
.
glob
(
'D:/s3_tute/*.mp4'
):
clip
=
VideoFileClip
(
filename
)
clip_arr
.
append
(
clip
)
final
=
concatenate_videoclips
(
clip_arr
)
final
.
write_videofile
(
"final_out.mp4"
)
return
json
.
loads
(
json
.
dumps
({
"filtered_words"
:
filtered_sentence
,
"tokens"
:
para_tokenize
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment