Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-060
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
2021-060
2021-060
Commits
cf38fd18
Commit
cf38fd18
authored
Sep 13, 2021
by
Chalika Mihiran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Silence.py
parent
ed538e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
25 deletions
+0
-25
Silence.py
Silence.py
+0
-25
No files found.
Silence.py
deleted
100644 → 0
View file @
ed538e53
import
os
from
pydub
import
AudioSegment
from
pydub.silence
import
split_on_silence
sound
=
AudioSegment
.
from_wav
(
"C:/Users/Janitha Akalanka/PycharmProjects/English.wav"
)
chunks
=
split_on_silence
(
sound
,
min_silence_len
=
200
,
silence_thresh
=
sound
.
dBFS
-
16
,
keep_silence
=
150
)
# Chunk Folder file Path
chunk_folder_name
=
"C:/Users/Janitha Akalanka/PycharmProjects/splits_by_pauses"
# create folder to store chunks
if
not
os
.
path
.
isdir
(
chunk_folder_name
):
os
.
mkdir
(
chunk_folder_name
)
for
i
,
audio_chunk
in
enumerate
(
chunks
,
start
=
1
):
chunk_file
=
os
.
path
.
join
(
chunk_folder_name
,
f
"chunk{i}.wav"
)
audio_chunk
.
export
(
chunk_file
,
format
=
"wav"
,
bitrate
=
'192k'
)
print
(
"****** How many times User Silence in their Speech *****"
)
# print count of silence
print
(
str
(
len
(
chunks
)
-
1
)
+
" : Silence/s found"
)
ScoreforUserSilence
=
70
/
100
\ 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