Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Export Finetuned wav2vec2 model #68

Merged
merged 2 commits into from
Aug 17, 2021
Merged

Export Finetuned wav2vec2 model #68

merged 2 commits into from
Aug 17, 2021

Conversation

thevasudevgupta
Copy link
Contributor

@thevasudevgupta thevasudevgupta commented Aug 10, 2021

Any pull request you open is subject to the TensorFlow Hub Terms of Service at www.tfhub.dev/terms and Google's Privacy Policy at https://www.google.com/policies/privacy.

This PR adds fine-tuned wav2vec2 model to TFHub. This model can directly be used for inference. It achieved ~ 6% WER on LibriSpeech test-clean dataset.

@MorganR @sayakpaul

@google-cla google-cla bot added the cla: yes label Aug 10, 2021
@sayakpaul
Copy link
Contributor

@vasudevgupta7 please work on the failure logs too.

@thevasudevgupta
Copy link
Contributor Author

@vasudevgupta7 please work on the failure logs too.

I am actually unable to understand the reason for failing logs. Any help is much appreciated.

@sayakpaul
Copy link
Contributor

I am actually unable to understand the reason for failing logs. Any help is much appreciated.

Strange that it's failing due to {'vasudevgupta7/models/wav2vec2-960h/1.md': 'Could not read tarfile.'}. You seem to have provided the correct tar path. Could it be that the directory structure is not correct as per the format the Hub expects?

In any case, @MorganR will be able to tell more.

@MorganR
Copy link

MorganR commented Aug 14, 2021

I am actually unable to understand the reason for failing logs. Any help is much appreciated.

Strange that it's failing due to {'vasudevgupta7/models/wav2vec2-960h/1.md': 'Could not read tarfile.'}. You seem to have provided the correct tar path. Could it be that the directory structure is not correct as per the format the Hub expects?

In any case, @MorganR will be able to tell more.

I would expect this to work too. I can investigate next week.

@thevasudevgupta
Copy link
Contributor Author

I would expect this to work too. I can investigate next week.

Thanks!!

Rest all suggestions are done.

@MorganR
Copy link

MorganR commented Aug 16, 2021

Hey Vasudev, it looks like the model asset is an archive, but it is not compressed. You can compress the model like this:

$ cd $SAVED_MODEL_DIR
$ tar -czvf ../saved-model.tar.gz *

That should fix the validation issue.

@thevasudevgupta
Copy link
Contributor Author

thevasudevgupta commented Aug 17, 2021

@MorganR, I have changed the saved-model.tar-gz file in my GCS bucket. Weights link is still the same as before. Can you re-run the tests?

@WGierke
Copy link
Contributor

WGierke commented Aug 17, 2021

Hi @vasudevgupta7
It looks like the archive contains some files that were auto-generated by OSX:

$ tar -xvf saved-model.tar.gz 
._assets
assets/
._saved_model.pb
saved_model.pb
._variables
variables/
variables/._variables.data-00000-of-00001
variables/variables.data-00000-of-00001
variables/._variables.index
variables/variables.index
$ cat variables/._variables.data-00000-of-00001 
Mac OS X        	2��ATTR��<�<com.apple.quarantineq/0083;611b559f;Safari...

Would you mind removing these files starting with ._, please?
Note that you can also execute the validation script yourself locally by running

python tools/validator.py vasudevgupta7/models/wav2vec2-960h/1.md

Thank you!

@thevasudevgupta
Copy link
Contributor Author

@WGierke, I have deleted extra files & tests passing for me locally.

@MorganR MorganR self-assigned this Aug 17, 2021
@MorganR MorganR merged commit 2051764 into tensorflow:master Aug 17, 2021
@github-actions
Copy link

Thank you for your contribution. Your pull request has been accepted according to the TensorFlow Hub Terms of Service at www.tfhub.dev/terms and Google's Privacy Policy at https://www.google.com/policies/privacy. Your model should appear on tfhub.dev within a day.

@thevasudevgupta thevasudevgupta deleted the finetuned-wav2vec2 branch October 29, 2021 00:06
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants