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
b7ddc469
Commit
b7ddc469
authored
Jul 04, 2021
by
IT18126884
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the Silence count
parent
900e3bca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
.idea/Updated.iml
.idea/Updated.iml
+8
-0
.idea/modules.xml
.idea/modules.xml
+1
-1
Silence.py
Silence.py
+19
-0
No files found.
.idea/Updated.iml
0 → 100644
View file @
b7ddc469
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
.idea/modules.xml
View file @
b7ddc469
...
...
@@ -2,7 +2,7 @@
<project
version=
"4"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/
2021-060.iml"
filepath=
"$PROJECT_DIR$/.idea/2021-060
.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/
Updated.iml"
filepath=
"$PROJECT_DIR$/.idea/Updated
.iml"
/>
</modules>
</component>
</project>
\ No newline at end of file
Silence.py
0 → 100644
View file @
b7ddc469
import
os
from
pydub
import
AudioSegment
from
pydub.silence
import
split_on_silence
sound
=
AudioSegment
.
from_wav
(
"chunk7.wav"
)
chunks
=
split_on_silence
(
sound
,
min_silence_len
=
50
,
silence_thresh
=
sound
.
dBFS
-
16
,
keep_silence
=
150
)
chunk_folder_name
=
"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
(
str
(
len
(
chunks
)
-
1
)
+
" : Pause/s found"
)
\ 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