SubMe
SubMe copied to clipboard
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Conversion completed.
Use Auditok to detect speech regions.
Auditok detection completed.
"/tmp/tmppaa509k1.wav" has been deleted.
Converting speech regions to short-term fragments.
Converting: 100% |##############################################| Time: 0:00:51
Sending short-term fragments to Google Speech V2 API and getting result.
Speech-to-Text: 100% |##########################################| Time: 0:06:25
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/autosub/__init__.py", line 169, in main
styles_list=styles_list)
File "/usr/local/lib/python3.7/dist-packages/autosub/cmdline_utils.py", line 1619, in audio_or_video_prcs
delete_chars=args.trans_delete_chars)
File "/usr/local/lib/python3.7/dist-packages/autosub/core.py", line 772, in list_to_googletrans
result_src = translator.detect(content_to_trans).lang
File "/usr/local/lib/python3.7/dist-packages/googletrans/client.py", line 369, in detect
translated = self.translate(text, src='auto', dest='en')
File "/usr/local/lib/python3.7/dist-packages/googletrans/client.py", line 219, in translate
parsed = json.loads(data[0][2])
File "/usr/lib/python3.7/json/__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Is this due to python being 3.7 instead of 3.6?
Could be.
Can you try running it again? I just tested and it works. https://colab.research.google.com/github/ChanJianHao/SubMe/blob/master/SubMe.ipynb
It still happens. What base format are you using?
Could be.
Can you try running it again? I just tested and it works. https://colab.research.google.com/github/ChanJianHao/SubMe/blob/master/SubMe.ipynb
I`m getting the same problem 👍
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 8, in