사용 환경 : windows anaconda
에러 내용
window Exception: FLAC conversion utility not available - consider installing the FLAC command line application by running `apt-get install flac` or your operating system's equivalent
Windows anaconda 해결 방법
1.윈도우에 맞는 파일 다운로드
https://ftp.osuosl.org/pub/xiph/releases/flac/
https://ftp.osuosl.org/pub/xiph/releases/flac/
Oregon State University Open Source Lab Mirrors
ftp.osuosl.org

가장 최신버전인 1.4.2 버전을 다운받았습니다.
압축 푼 후

세가지 파일을
C:\Windows\System32 경로에 붙여놓습니다.
flac.exe 한번 실행해 줍니다.
2. 파일 수정
C:\Users\사용자명\anaconda3\envs\프로젝트명\Lib\site-packages\speech_recognition
( 빨간색 부분은 본인 환경에 맞게 수정해 주셔야 합니다.)
에서 get_flac_converter() 함수가 있는 파일을 찾습니다.

저의 경우 audio.py 였습니다.
flac -> flac.exe 로 변경해 줍니다.
변경 전
def get_flac_converter():
"""Returns the absolute path of a FLAC converter executable, or raises an OSError if none can be found."""
flac_converter = shutil_which("flac") # check for installed version first
변경 후
def get_flac_converter():
"""Returns the absolute path of a FLAC converter executable, or raises an OSError if none can be found."""
flac_converter = shutil_which("flac.exe") # check for installed version first
위 과정을 거치면 정상적으로 작동됩니다.
'프로그래밍 > 개인 프로젝트' 카테고리의 다른 글
mecab 실행 오류 (0) | 2023.06.15 |
---|---|
pymysql 활용한 함수 시행착오 (0) | 2023.06.07 |
[라즈베리파이] talib 설치 및 오류 해결 (0) | 2023.06.06 |
[라즈베리파이] omv Failed to execute command 'export 오류(2) (0) | 2023.04.07 |
[라즈베리파이] omv Failed to execute command 'export 오류(1) (0) | 2023.03.30 |