Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SpeechDatasets.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PTAL
Datasets
SpeechDatasets.jl
Commits
c7ad7a19
Commit
c7ad7a19
authored
1 year ago
by
Martin Kocour
Browse files
Options
Downloads
Patches
Plain Diff
Support multi channel supervisions
parent
7a7ff2f6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/corpora/timit.jl
+1
-1
1 addition, 1 deletion
src/corpora/timit.jl
src/manifest_io.jl
+4
-4
4 additions, 4 deletions
src/manifest_io.jl
src/manifest_item.jl
+4
-4
4 additions, 4 deletions
src/manifest_item.jl
with
9 additions
and
9 deletions
src/corpora/timit.jl
+
1
−
1
View file @
c7ad7a19
...
@@ -306,7 +306,7 @@ function timit_supervisions(dir)
...
@@ -306,7 +306,7 @@ function timit_supervisions(dir)
dur
=
end_ts
-
start_ts
dur
=
end_ts
-
start_ts
supervisions
[
id
]
=
Supervision
(
supervisions
[
id
]
=
Supervision
(
id
,
id
,
start_ts
,
dur
,
1
,
id
,
id
,
start_ts
,
dur
,
[
1
]
,
Dict
(
Dict
(
"text"
=>
join
(
words
,
" "
),
"text"
=>
join
(
words
,
" "
),
"dialect"
=>
dialect
,
"dialect"
=>
dialect
,
...
...
This diff is collapsed.
Click to expand it.
src/manifest_io.jl
+
4
−
4
View file @
c7ad7a19
...
@@ -62,7 +62,7 @@ function Base.show(io::IO, m::MIME"application/json", s::Supervision)
...
@@ -62,7 +62,7 @@ function Base.show(io::IO, m::MIME"application/json", s::Supervision)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
recording_id
\"
:
\"
"
,
s
.
recording_id
,
"
\"
, "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
recording_id
\"
:
\"
"
,
s
.
recording_id
,
"
\"
, "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
start
\"
: "
,
s
.
start
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
start
\"
: "
,
s
.
start
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
duration
\"
: "
,
s
.
duration
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
duration
\"
: "
,
s
.
duration
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
channel
\"
: "
,
s
.
channel
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
channel
s
\"
: "
,
s
.
channel
s
|>
json
,
", "
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
data
\"
: "
,
s
.
data
|>
json
)
printfn
(
io
,
repeat
(
" "
,
indent
),
"
\"
data
\"
: "
,
s
.
data
|>
json
)
print
(
io
,
"}"
)
print
(
io
,
"}"
)
end
end
...
@@ -101,7 +101,7 @@ Supervision(d::Dict) = Supervision(
...
@@ -101,7 +101,7 @@ Supervision(d::Dict) = Supervision(
d
[
"recording_id"
],
d
[
"recording_id"
],
d
[
"start"
],
d
[
"start"
],
d
[
"duration"
],
d
[
"duration"
],
d
[
"channel"
],
d
[
"channel
s
"
],
d
[
"data"
]
d
[
"data"
]
)
)
...
@@ -129,8 +129,8 @@ manifestname(::Type{<:Recording}, name) = "recordings-$name.jsonl"
...
@@ -129,8 +129,8 @@ manifestname(::Type{<:Recording}, name) = "recordings-$name.jsonl"
manifestname
(
::
Type
{
<:
Supervision
},
name
)
=
"supervisions-
$
name.jsonl"
manifestname
(
::
Type
{
<:
Supervision
},
name
)
=
"supervisions-
$
name.jsonl"
"""
"""
load(Supervision, path)
load(Supervision, path)
load(Recording, path)
load(Recording, path)
Load Recording/Supervision manifest from `path`.
Load Recording/Supervision manifest from `path`.
"""
"""
...
...
This diff is collapsed.
Click to expand it.
src/manifest_item.jl
+
4
−
4
View file @
c7ad7a19
...
@@ -74,12 +74,12 @@ struct Supervision <: ManifestItem
...
@@ -74,12 +74,12 @@ struct Supervision <: ManifestItem
recording_id
::
AbstractString
recording_id
::
AbstractString
start
::
Float64
start
::
Float64
duration
::
Float64
duration
::
Float64
channel
::
Int
channel
s
::
Vector
{
Integer
}
data
::
Dict
data
::
Dict
end
end
Supervision
(
id
,
recid
;
channel
=
missing
,
start
=
-
1
,
duration
=
-
1
,
data
=
missing
)
=
Supervision
(
id
,
recid
;
channel
s
=
missing
,
start
=
-
1
,
duration
=
-
1
,
data
=
missing
)
=
Supervision
(
id
,
recid
,
start
,
duration
,
channel
,
data
)
Supervision
(
id
,
recid
,
start
,
duration
,
channel
s
,
data
)
"""
"""
load(recording[; start = -1, duration = -1, channels = recording.channels])
load(recording[; start = -1, duration = -1, channels = recording.channels])
...
@@ -108,5 +108,5 @@ function load(r::Recording; start = -1, duration = -1, channels = r.channels)
...
@@ -108,5 +108,5 @@ function load(r::Recording; start = -1, duration = -1, channels = r.channels)
end
end
load
(
r
::
Recording
,
s
::
Supervision
)
=
load
(
r
::
Recording
,
s
::
Supervision
)
=
load
(
r
;
start
=
s
.
start
,
duration
=
s
.
duration
,
channels
=
[
s
.
channel
]
)
load
(
r
;
start
=
s
.
start
,
duration
=
s
.
duration
,
channels
=
s
.
channel
s
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment