-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Removes use of torchaudio and moves transforms inside of NeMo #15211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jason <[email protected]>
Signed-off-by: blisc <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: blisc <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: blisc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update or remove torchaudio references from following files as well:
nemo/collections/tts/models/magpietts_preference_optimization.pydocker/Dockerfile.speechscripts/installers/install_torchaudio_latest.shdocs/source/speechlm2/intro.rstnemo/collections/audio/metrics/squim.py
In following files they are being installed but not used. We can update them too.
tutorials/00_NeMo_Primer.ipynbtutorials/01_NeMo_Models.ipynbtutorials/asr/Online_Offline_Microphone_VAD_Demo.ipynbtutorials/asr/Online_Offline_Speech_Commands_Demo.ipynbtutorials/asr/Streaming_Multitalker_ASR.ipynbtutorials/audio/speech_enhancement/BNR_Speech_enhancement_with_NeMo.ipynbtutorials/audio/speech_enhancement/Speech_Enhancement_with_NeMo.ipynbtutorials/speaker_tasks/ASR_with_SpeakerDiarization.ipynbtutorials/speaker_tasks/End_to_End_Diarization_Inference.ipynbtutorials/speaker_tasks/Speaker_Diarization_Inference.ipynbtutorials/speaker_tasks/Speaker_Identification_Verification.ipynbtutorials/speaker_tasks/Streaming_End_to_End_Diarization_Inference.ipynb
| nb_max_freq (int) : Frequency above which all frequencies will be masked for narrowband augmentation. | ||
| Defaults to 4000 | ||
| use_torchaudio: Whether to use the `torchaudio` implementation. | ||
| use_torchaudio: Whether to use the FilterbankFeatures or FilterbankFeaturesTA class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this option altogether?
| featurizer_class = FilterbankFeatures | ||
| else: | ||
| featurizer_class = FilterbankFeaturesTA | ||
| featurizer_class = FilterbankFeaturesTA if use_torchaudio else FilterbankFeatures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see from features.py FilterbankFeaturesTA doesn;t use torchaudio. I think we can remove this condition and default to FilterbankFeatures
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from nemo.collections.audio.models.audio_to_audio import AudioToAudioModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to remove these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes a circular dependency if this stays in the init
We do not have a replacement for SQIUM-MOS. I think we still need to keep the import check there. But we can remove it from the dockerfile and tutorials. |
pzelasko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after addressing Nithin's concerns
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: blisc <[email protected]>
Signed-off-by: Jason <[email protected]>
…o tts_2512_removetorchaudio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chtruong814 could you help review the docker file changes.
|
@blisc I think updates to |
I don't know if there is an equivalent to torchaudio.load() so I'm deferring making that change. @PiotrDabkowski Do you have a recommendation on how to update that docs? |
|
That failing CI test is okay to skip as its flaky. @chtruong814 FYI |
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Removes use of torchaudio.transforms and moves transforms inside of NeMo.
NOTE: we will use torchsquirm in nemo/collections/audio/metrics/squim.py and nemo/collections/tts/models/magpietts_preference_optimization.py
Collection: audio, asr, tts
Changelog
PR Type: