전체 포스팅 보기
-
파이썬 프로그램을 실행하던 도중 아래와 같은 에러에 직면하였습니다. 에러명 UnsupportedOperation : not readable 해결방법 r+ 모드로 옵션을 변경합니다. 파일을 여는 것(open)과 관련된 함수를 찾아서, r+ 옵션을 부여하였고 인코딩 utf8을 입력하였습니다. with open(config.metadata_path, mode='r+', encoding='utf8') as f: 예제 file = open("File.txt","r") 옵션 "r" Opens a file for reading only. "r+" Opens a file for both reading and writing. "rb" Opens a file for reading only in binary format. ..
7. UnsupportedOperation : not readable파이썬 프로그램을 실행하던 도중 아래와 같은 에러에 직면하였습니다. 에러명 UnsupportedOperation : not readable 해결방법 r+ 모드로 옵션을 변경합니다. 파일을 여는 것(open)과 관련된 함수를 찾아서, r+ 옵션을 부여하였고 인코딩 utf8을 입력하였습니다. with open(config.metadata_path, mode='r+', encoding='utf8') as f: 예제 file = open("File.txt","r") 옵션 "r" Opens a file for reading only. "r+" Opens a file for both reading and writing. "rb" Opens a file for reading only in binary format. ..
2019.04.07 -
음성합성을 진행하다보면 alignment.json에 음성과 텍스트를 쌍을 저장하기 위해서 아래의 명령어를 실행할 때가 있다. python -m recognition.alignment --recognition_path "./datasets/son/recognition.json" --score_threshold=0.5 --recognition_encoding="utf-8" 상황에 따라 다를 수도 있겠지만, 인코딩 이슈 또는 IndexError list index out of range에러를 만날 것이다. 인코딩 이슈를 만났을 경우 에러명 : UnicodeDecodeError: 'cp949' codec can't decode byte 0xec in position 51: illegal multibyte seq..
6. [음성합성] IndexError list index out of range 해결음성합성을 진행하다보면 alignment.json에 음성과 텍스트를 쌍을 저장하기 위해서 아래의 명령어를 실행할 때가 있다. python -m recognition.alignment --recognition_path "./datasets/son/recognition.json" --score_threshold=0.5 --recognition_encoding="utf-8" 상황에 따라 다를 수도 있겠지만, 인코딩 이슈 또는 IndexError list index out of range에러를 만날 것이다. 인코딩 이슈를 만났을 경우 에러명 : UnicodeDecodeError: 'cp949' codec can't decode byte 0xec in position 51: illegal multibyte seq..
2019.04.07 -
파이썬에서 except를 사용하려면 try와 함께 사용해야합니다. try없이 except를 사용하였을 경우 SyntaxError : Invalid syntax라는 에러를 만나게 됩니다. 감사합니다.
[pyton] except Invalid syntax파이썬에서 except를 사용하려면 try와 함께 사용해야합니다. try없이 except를 사용하였을 경우 SyntaxError : Invalid syntax라는 에러를 만나게 됩니다. 감사합니다.
2019.04.07 -
recognition.google --audio_pattern을 실행해보았습니다. Google Speech Recognition API 를 사용하여, 오디오에 대한 문장을 출력해줍니다. > python -m recognition.google --audio_pattern "./datasets/son/audio/*.*.wav" 약... 4시간? 이 걸린 것으로 기억합니다. 해당 작업이 끝나면 275$ (약 28만원)을 사용하게 됩니다. ㄷㄷ 실행 중에 아래와 같은 에러에 직면할 수도 있습니다. 에러 발생 : cp949 codec can't decode byte 0xec in position illgall multibyte sequence 에러 원인 : cp949는 인코딩 문제입니다. 해결방법 : recogr..
5. [음성합성] recognition.google --audio_patternrecognition.google --audio_pattern을 실행해보았습니다. Google Speech Recognition API 를 사용하여, 오디오에 대한 문장을 출력해줍니다. > python -m recognition.google --audio_pattern "./datasets/son/audio/*.*.wav" 약... 4시간? 이 걸린 것으로 기억합니다. 해당 작업이 끝나면 275$ (약 28만원)을 사용하게 됩니다. ㄷㄷ 실행 중에 아래와 같은 에러에 직면할 수도 있습니다. 에러 발생 : cp949 codec can't decode byte 0xec in position illgall multibyte sequence 에러 원인 : cp949는 인코딩 문제입니다. 해결방법 : recogr..
2019.04.06 -
Exception: OS error: RetryError(Exception occurred in retry method that was not classified as transient, caused by ) pip install librosa==0.5.1 https://pypi.org/project/librosa/0.5.1/ librosa 버전 정확히 맞춰보세요. WAV header indicates 해결됩니다. 궁금한 점이 있으면 댓글남겨주세요. 감사합니다.
4. [음성합성] INVALID_ARGUMENT, WAV header indicates 해결Exception: OS error: RetryError(Exception occurred in retry method that was not classified as transient, caused by ) pip install librosa==0.5.1 https://pypi.org/project/librosa/0.5.1/ librosa 버전 정확히 맞춰보세요. WAV header indicates 해결됩니다. 궁금한 점이 있으면 댓글남겨주세요. 감사합니다.
2019.04.06 -
https://doctorson0309.tistory.com/432 위의 글을 읽었다면, 음성 데이터를 다운을 시도하였을 것입니다. 그러나 간혹 아래와 같은 에러에 직면할 수도 있습니다. 'cp949' codec can't encode character '\xa0' 이것은 파일 열기와 관련된 파이썬 코드에 인코딩을 안 넣었다는 의미입니다. 더 확실하게 설명하자면, UTF-8로 저장되어 있는 텍스트 파일을 열라고 시켰는데 파이썬이 싫다고 에러를 뱉은 것입니다. 파이썬은 ANSI를 좋아하기 때문입니다. (??) ㅎㅎㅎ 텍스트 파일을 ANSI로 바꿔도 에러는 해결될 테지만, 아래와 같이 하는 것이 더 좋습니다. 기존에 아래와 같이 코딩되어 있을 것입니다. open("test1.txt", mode='w') 그것..
3. [음성합성] cp949 codec can't encode characterhttps://doctorson0309.tistory.com/432 위의 글을 읽었다면, 음성 데이터를 다운을 시도하였을 것입니다. 그러나 간혹 아래와 같은 에러에 직면할 수도 있습니다. 'cp949' codec can't encode character '\xa0' 이것은 파일 열기와 관련된 파이썬 코드에 인코딩을 안 넣었다는 의미입니다. 더 확실하게 설명하자면, UTF-8로 저장되어 있는 텍스트 파일을 열라고 시켰는데 파이썬이 싫다고 에러를 뱉은 것입니다. 파이썬은 ANSI를 좋아하기 때문입니다. (??) ㅎㅎㅎ 텍스트 파일을 ANSI로 바꿔도 에러는 해결될 테지만, 아래와 같이 하는 것이 더 좋습니다. 기존에 아래와 같이 코딩되어 있을 것입니다. open("test1.txt", mode='w') 그것..
2019.04.01