Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
4206e7ed
Commit
4206e7ed
authored
Dec 12, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass commandline to ttfb-test.py; display average time.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
7c077a88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
ttfb-test.py
src/ttfb-test.py
+12
-4
No files found.
src/ttfb-test.py
View file @
4206e7ed
...
...
@@ -3,13 +3,21 @@
# test how long the watermarker takes until the first audio sample is available
import
subprocess
import
shlex
import
time
import
sys
seconds
=
0
for
i
in
range
(
10
):
start_time
=
time
.
time
()
proc
=
subprocess
.
Popen
(
[
"audiowmark"
,
"add"
,
"test/T01__09_sing_sang_sung.flac.wav"
,
"-"
,
"f0"
]
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
start_time
=
time
.
time
()
*
1000
proc
=
subprocess
.
Popen
(
shlex
.
split
(
sys
.
argv
[
1
])
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
# we wait for actual audio data, so we read somewhat larger amount of data that the wave header
x
=
proc
.
stdout
.
read
(
1000
)
end_time
=
time
.
time
()
print
(
end_time
-
start_time
,
x
[
0
:
4
],
len
(
x
))
end_time
=
time
.
time
()
*
1000
seconds
+=
end_time
-
start_time
print
(
"
%.2
f"
%
(
end_time
-
start_time
),
x
[
0
:
4
],
len
(
x
))
print
(
"
%.2
f"
%
(
seconds
/
10
),
"avg"
)
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