I ran pretty much this exact speech recognition code in Spyder, but I kept getting the same error as alpha. I tried viilpe's solution, but it still didn't work for me. I don't know if something has updated or changed between now and 2017, but even though I put the flac file in my System32 folder and renamed it flac, my computer still treated it as being named 'flac.exe'. I had to edit the source code, changing the line: