[TTS] capture exception of non-supported windows.
* remove redundant lines;
* declare global variables;
* capture exception of non-supported windows.

Signed-off-by: Xuesong Yang <xuesongyxs@gmail.com>

# What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

**Collection**: [Note which collection this PR will affect]

# Changelog 
- Add specific line by line info of high level changes in this PR.

# Usage
* You can potentially add a usage example below

```bash
(nemo) xueyang@aiapps-031622:~/workspace/NeMo$ pytest --cpu tests/collections/tts/test_torch_tts.py::TestTTSDataset::test_raise_exception_on_not_supported_window
============================================================== test session starts ==============================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0 -- /home/xueyang/miniconda3/envs/nemo/bin/python
cachedir: .pytest_cache
rootdir: /home/xueyang/workspace/NeMo, configfile: setup.cfg
plugins: hydra-core-1.1.1
collected 1 item

tests/collections/tts/test_torch_tts.py::TestTTSDataset::test_raise_exception_on_not_supported_window PASSED                              [100%]
========================================================= 1 passed, 4 warnings in 3.87s =========================================================
```

# Before your PR is "Ready for review"
**Pre checks**:
- [x] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [x] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)
