Skip to content

Add def main() to training recipes to avoid PermissionError on Windows #422

Open
@eginhard

Description

@eginhard

This is a simple issue that anyone could take on and doesn't need prior knowledge of the codebase.

Many users report errors like the following when training models on Windows (coqui-ai#1711, coqui-ai#3484, coqui-ai#1563, coqui-ai#1110, #328):

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
'C:/Temp/TTS/TTS/recipes/ljSpeech/glow_tts/run-January-01-2024_07+21PM-5dcc16d1\trainer_0_log.txt'

This can likely be fixed by wrapping all training recipes in main() functions: https://stackoverflow.com/a/24374798

Steps:

  1. For all training recipes in https://github.com/idiap/coqui-ai-TTS/tree/dev/recipes
  2. Wrap the code in def main():
  3. Add the end of the scripts add:
if __name__ == "__main__":
    main()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedLooking for outside contributions

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions