Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
parler-tts
Commits
9d25447e
Commit
9d25447e
authored
Feb 27, 2024
by
Yoach Lacombe
Browse files
fix eval + correct json
parent
0f6d59d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
example_configs/librispeech_tts_r.json
example_configs/librispeech_tts_r.json
+1
-1
example_configs/librispeech_tts_r_dummy.json
example_configs/librispeech_tts_r_dummy.json
+1
-1
run_stable_speech_training.py
run_stable_speech_training.py
+4
-5
No files found.
example_configs/librispeech_tts_r.json
View file @
9d25447e
{
{
"model_name_or_path"
:
"/home/yoach/dataspeech/artefacts/tiny-model/"
,
"model_name_or_path"
:
"/home/yoach/dataspeech/artefacts/tiny-model/"
,
"feature_extractor_name"
:
"facebook/encodec_2
4
khz"
,
"feature_extractor_name"
:
"facebook/encodec_
3
2khz"
,
"description_tokenizer_name"
:
"t5-base"
,
"description_tokenizer_name"
:
"t5-base"
,
"prompt_tokenizer_name"
:
"t5-base"
,
"prompt_tokenizer_name"
:
"t5-base"
,
...
...
example_configs/librispeech_tts_r_dummy.json
View file @
9d25447e
{
{
"model_name_or_path"
:
"/home/yoach/dataspeech/artefacts/tiny-model/"
,
"model_name_or_path"
:
"/home/yoach/dataspeech/artefacts/tiny-model/"
,
"feature_extractor_name"
:
"facebook/encodec_2
4
khz"
,
"feature_extractor_name"
:
"facebook/encodec_
3
2khz"
,
"description_tokenizer_name"
:
"t5-base"
,
"description_tokenizer_name"
:
"t5-base"
,
"prompt_tokenizer_name"
:
"t5-base"
,
"prompt_tokenizer_name"
:
"t5-base"
,
...
...
run_stable_speech_training.py
View file @
9d25447e
...
@@ -31,7 +31,7 @@ import evaluate
...
@@ -31,7 +31,7 @@ import evaluate
from
tqdm
import
tqdm
from
tqdm
import
tqdm
from
pathlib
import
Path
from
pathlib
import
Path
from
dataclasses
import
dataclass
,
field
from
dataclasses
import
dataclass
,
field
from
typing
import
Dict
,
List
,
Optional
,
Union
from
typing
import
Dict
,
List
,
Optional
,
Union
,
Set
import
datasets
import
datasets
import
numpy
as
np
import
numpy
as
np
...
@@ -606,7 +606,7 @@ def load_multiple_datasets(
...
@@ -606,7 +606,7 @@ def load_multiple_datasets(
streaming
:
Optional
[
bool
]
=
False
,
streaming
:
Optional
[
bool
]
=
False
,
seed
:
Optional
[
int
]
=
None
,
seed
:
Optional
[
int
]
=
None
,
id_column_name
:
Optional
[
str
]
=
None
,
id_column_name
:
Optional
[
str
]
=
None
,
columns_to_keep
:
Optional
[
s
et
[
str
]]
=
None
,
columns_to_keep
:
Optional
[
S
et
[
str
]]
=
None
,
**
kwargs
,
**
kwargs
,
)
->
Union
[
Dataset
,
IterableDataset
]:
)
->
Union
[
Dataset
,
IterableDataset
]:
dataset_names_dict
=
convert_dataset_str_to_list
(
dataset_names_dict
=
convert_dataset_str_to_list
(
...
@@ -1396,9 +1396,8 @@ def main():
...
@@ -1396,9 +1396,8 @@ def main():
# Gather all predictions and targets
# Gather all predictions and targets
# TODO: also add prompt ids
# TODO: also add prompt ids
# TODO: better gather
# TODO: better gather
generated_audios
,
input_ids
,
prompts
=
accelerator
.
gather_for_metrics
(
generated_audios
,
input_ids
,
prompts
=
accelerator
.
pad_across_processes
((
generated_audios
,
batch
[
"input_ids"
],
batch
[
"prompt_input_ids"
]),
dim
=
1
,
pad_index
=
0
)
(
generated_audios
,
batch
[
"input_ids"
],
batch
[
"prompt_input_ids"
])
generated_audios
,
input_ids
,
prompts
=
accelerator
.
gather_for_metrics
((
generated_audios
,
input_ids
,
prompts
))
)
eval_preds
.
extend
(
generated_audios
)
eval_preds
.
extend
(
generated_audios
)
eval_descriptions
.
extend
(
input_ids
)
eval_descriptions
.
extend
(
input_ids
)
eval_prompts
.
extend
(
prompts
)
eval_prompts
.
extend
(
prompts
)
...
...
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