json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #172

Closed
opened 2023-03-25 02:38:24 +00:00 by The13thDrifter · 2 comments

I am once again making a bug report on something that is probably user error, but as I have no understanding on how to tell the difference, I'd rather air on the safe side here and look dumb, but know for sure.

Attempting to 'Transcribe and Process' results in a shorthand error that reads:
'Expecting value: line 1 column 1 (char 0)'

Something that presumably has to do with Whisper being unable to transcribe the .wav files- or could be related to it being unable to either access/create/modify the whisper.json file. The long form error message reads like this:

Traceback (most recent call last):
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\src\webui.py", line 201, in prepare_dataset_proxy
message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress )
File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\src\utils.py", line 1324, in transcribe_dataset
results = json.load(open(infile, 'r', encoding="utf-8"))
File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I had actually assumed that, since I couldn't get the program to work for me, I could just skip this step by manually transcribing each .wav file in the whisper.json file manually; line by line. However after doing so, and telling the program to (Re)Create Dataset, I get the exact same error message.

I am on the most recent update of the software, and I have installed it correctly for my current version of windows.

I am once again making a bug report on something that is probably user error, but as I have no understanding on how to tell the difference, I'd rather air on the safe side here and look dumb, but know for sure. Attempting to 'Transcribe and Process' results in a shorthand error that reads: 'Expecting value: line 1 column 1 (char 0)' Something that presumably has to do with Whisper being unable to transcribe the .wav files- or could be related to it being unable to either access/create/modify the whisper.json file. The long form error message reads like this: > Traceback (most recent call last): File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\src\webui.py", line 201, in prepare_dataset_proxy message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress ) File "C:\Users\jenik\Documents\FourChanFork\ai-voice-cloning\src\utils.py", line 1324, in transcribe_dataset results = json.load(open(infile, 'r', encoding="utf-8")) File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\jenik\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) I had actually assumed that, since I couldn't get the program to work for me, I could just skip this step by manually transcribing each .wav file in the whisper.json file manually; line by line. However after doing so, and telling the program to (Re)Create Dataset, I get the exact same error message. I am on the most recent update of the software, and I have installed it correctly for my current version of windows.

I had actually assumed that, since I couldn't get the program to work for me, I could just skip this step by manually transcribing each .wav file in the whisper.json file manually; line by line. However after doing so, and telling the program to (Re)Create Dataset, I get the exact same error message.

If you want to create a dataset manually you don't need to bother with the whisper.json at all, the Generate Configuration tab uses only train.txt and validation.txt (and that one is optional). I've attached an example. Per the wiki each entry must be "over 0.6s and under 11.6s and text lengths under 200 characters".

Edit: If you want to find out why it's choking when you click "(Re)Create Dataset" I'd suggest running your whisper.json through a linter.

> I had actually assumed that, since I couldn't get the program to work for me, I could just skip this step by manually transcribing each .wav file in the whisper.json file manually; line by line. However after doing so, and telling the program to (Re)Create Dataset, I get the exact same error message. If you want to create a dataset manually you don't need to bother with the whisper.json at all, the Generate Configuration tab uses only train.txt and validation.txt (and that one is optional). I've attached an example. Per the wiki each entry must be "over 0.6s and under 11.6s and text lengths under 200 characters". Edit: If you want to find out why it's choking when you click "(Re)Create Dataset" I'd suggest running your whisper.json through a linter.
3.0 KiB
Author

I see, if that's the case I might not need to even fix this. I'll leave it open for now just in case, but I'll see what I can do. Thank you for pointing me in the right direction!

I see, if that's the case I might not need to even fix this. I'll leave it open for now just in case, but I'll see what I can do. Thank you for pointing me in the right direction!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#172
No description provided.