https://pastebin.com/cNKDr1M4
This is a test script for a STT tool I'm making. The purpose of the tool is to identify a pokemon name from speech, and then display relevant information.
I'm currently working on the STT portion. I'm using the faster-whisper model, and fuzzymatching to identify the pokemon name from speech correctly.
The test script has a function, compare_transaction() which iterates over 251 pokemon name recordings, transcribes each one, and puts information about the transcription into a dictionary. compare_transaction() then returns the dictionary.
I call the compare_transaction() function on line 52. All the code from this function runs and the loop completes. In vscode debug, I can see the data variable is a dict and, before the function has fully exited, has all 251 pokemon names as keys. The following print statements, and json.dump do not run. The print statements are not shown in the terminal, and the json file is not written.
If I modify compare_transaction() to run a limited number of times, it will run the print/json statements successfully. I have not tested this exhaustively, so as to find the "edge" of where this will fail or succeed, and have only limited the loop to running 10 times to see if it would work.
I would really appreciate any help understanding why this apparently fails without any errors. I have posted this previously. I was recommended to use the debugger with breakpoints, but unfortunately this didn't reveal anything. I'm hoping for some additional insight.
brainlet degree of troubleshooting