Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J-02
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
21_22-J-02
21_22-J-02
Commits
57237faa
Commit
57237faa
authored
May 01, 2022
by
NaweenTharuka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated video to text
parent
302a412f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
Presently/presently/media/video/22/testvideo.mp4
Presently/presently/media/video/22/testvideo.mp4
+0
-0
Presently/presently/users/stt.py
Presently/presently/users/stt.py
+13
-0
No files found.
Presently/presently/media/video/22/testvideo.mp4
deleted
100644 → 0
View file @
302a412f
File deleted
Presently/presently/users/stt.py
0 → 100644
View file @
57237faa
import
speech_recognition
as
sr
import
moviepy.editor
as
mp
clip
=
mp
.
VideoFileClip
(
r"F:\\CDAP-PRESENTLY\\21_22-j-02\\Presently\\presently\\media\\video\\22\\publicspeech.mp4"
)
clip
.
audio
.
write_audiofile
(
r"converted_mp3.wav"
)
r
=
sr
.
Recognizer
()
audio
=
sr
.
AudioFile
(
r"converted_mp3.wav"
)
with
audio
as
source
:
r
.
pause_threshold
=
1
r
.
adjust_for_ambient_noise
(
source
,
duration
=
1
)
audio_file
=
r
.
record
(
source
)
result
=
r
.
recognize_google
(
audio_file
)
print
(
result
)
\ No newline at end of file
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