Skip to content

Commit

Permalink
readme: Add tfrecord
Browse files Browse the repository at this point in the history
  • Loading branch information
revsic committed Jul 17, 2021
1 parent 0102a3f commit 93a3ce2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,24 @@ Tested in python 3.8.5 windows 10 miniconda environment, [requirements.txt](./re
## Sample

Sample script is provided as [sample.py](./sample.py)

## TFRecord Suuport

Dump the tfrecord.
```
python dump.py \
--reader ljspeech \
--data-dir D:\dataset\LJSpeech-1.1\tfrecord \
--from-raw \
--target acoustic \
--path D:\dataset\LJSpeech-1.1\tfrecord\acoustic
```

Load TFRecord
```python
record = speechset.TFRecordDataset(
config, 'D:\\dataset\\ljspeech.tfrecord', 'acoustic')
trainset, testset = record.dataset(13000)
# unpack
text, mel, textlen, mellen = next(iter(testset))
```

0 comments on commit 93a3ce2

Please sign in to comment.