Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1389 wave.Error: unknown format: 65534 #154

Closed
sih4sing5hong5 opened this issue Feb 22, 2019 · 3 comments
Closed

1389 wave.Error: unknown format: 65534 #154

sih4sing5hong5 opened this issue Feb 22, 2019 · 3 comments
Assignees
Labels
程式 Something isn't working

Comments

@sih4sing5hong5
Copy link
Contributor

it_1     | Traceback (most recent call last):
it_1     |   File "manage.py", line 10, in <module>
it_1     |     execute_from_command_line(sys.argv)
it_1     |   File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
it_1     |     utility.execute()
it_1     |   File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 356, in execute
it_1     |     self.fetch_command(subcommand).run_from_argv(self.argv)
it_1     |   File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
it_1     |     self.execute(*args, **cmd_options)
it_1     |   File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 330, in execute
it_1     |     output = self.handle(*args, **options)
it_1     |   File "/usr/local/lib/python3.7/site-packages/臺灣言語服務/management/commands/音檔轉Kaldi格式資料.py", line 58, in handle
it_1     |     Q(pk=過渡格式.編號())
it_1     |   File "/usr/local/lib/python3.7/site-packages/臺灣言語服務/Kaldi語料匯出.py", line 46, in 匯出一種語言語料
it_1     |     匯出條件,
it_1     |   File "/usr/local/lib/python3.7/site-packages/臺灣言語服務/Kaldi語料匯出.py", line 203, in _揣影音輸出
it_1     |     音檔長度 = 一筆.聲音檔().時間長度()
it_1     |   File "/usr/local/lib/python3.7/site-packages/臺灣言語服務/models.py", line 56, in 聲音檔
it_1     |     return 聲音檔.對檔案讀(self.影音所在)
it_1     |   File "/usr/local/lib/python3.7/site-packages/臺灣言語工具/語音辨識/聲音檔.py", line 11, in 對檔案讀
it_1     |     with wave.open(音檔所在, 'rb') as wave音檔:
it_1     |   File "/usr/local/lib/python3.7/wave.py", line 510, in open
it_1     |     return Wave_read(f)
it_1     |   File "/usr/local/lib/python3.7/wave.py", line 164, in __init__
it_1     |     self.initfp(f)
it_1     |   File "/usr/local/lib/python3.7/wave.py", line 144, in initfp
it_1     |     self._read_fmt_chunk(chunk)
it_1     |   File "/usr/local/lib/python3.7/wave.py", line 269, in _read_fmt_chunk
it_1     |     raise Error('unknown format: %r' % (wFormatTag,))
it_1     | wave.Error: unknown format: 65534

http://wavefilegem.com/how_wave_files_work.html
jiaaro/pydub#134

@sih4sing5hong5
Copy link
Contributor Author

sih4sing5hong5 commented Feb 22, 2019

from SuiSiannAdminApp.models import 句表
for ku in 句表.objects.order_by('-id').filter(id__lt=1389):
    print(ku.id)
    ku.重對齊()

@sih4sing5hong5 sih4sing5hong5 self-assigned this Feb 22, 2019
@sih4sing5hong5 sih4sing5hong5 added the 程式 Something isn't working label Feb 22, 2019
@sih4sing5hong5
Copy link
Contributor Author

@Cybernetic1
Copy link

A Chinese web site says that it is due to WAV file format, not the fault of ffmpeg.
The solution is to use the sox utility:

sox input.wav -b 16 -e signed-integer output.wav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
程式 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants