Skip to content
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

Update dataset.py, change recursive __getitem__ to while loop; fix finetune_gradio.py #485

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

atlonxp
Copy link
Contributor

@atlonxp atlonxp commented Nov 18, 2024

Change recursive approach in __getitem__ function (CustomDataset class) to while loop, avoiding potential memory leak.

Assumption: Recursive Calls in getitem Leading to Memory Leak
Potential Problem: If there are consecutive samples with invalid durations, this recursive call can lead to a deep recursion stack, consuming a significant amount of memory and possibly causing a stack overflow.

Update get_random_sample_transcribe to handle absolute paths in finetune_gradio.py

  • Added support for processing absolute file paths during transcription.
  • Updated logic to correctly handle and return audio file paths with absolute URLs.
  • Example use case: URLs like ~/datasets/multi-tts/th/150/150896/150-150896-40.wav.wav.
  • Correct one must be ``~/datasets/multi-tts/th/150/150896/150-150896-40.wav`.

atlonxp and others added 3 commits November 18, 2024 20:53
change recursive approach to while loop, avoiding potential memory leak.
…etune_gradio.py

Update `get_random_sample_transcribe` to handle absolute paths in `finetune_gradio.py`

- Added support for processing absolute file paths during transcription.
- Updated logic to correctly handle and return audio file paths with absolute URLs.
- Example use case: URLs like `https://localhost:55555/speech/150/150896/150-150896-40.wav.wav`.
- Correct one should be: `https://localhost:55555/speech/150/150896/150-150896-40.wav`.
@SWivid SWivid merged commit 058b446 into SWivid:main Nov 18, 2024
1 check failed
@SWivid SWivid changed the title Update dataset.py Update get_random_sample_transcribe when absolute path is used in finetune_gradio.py Nov 18, 2024
@SWivid SWivid changed the title Update get_random_sample_transcribe when absolute path is used in finetune_gradio.py Update dataset.py, change recursive __getitem__ to while loop; fix finetune_gradio.py Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants