i3thuan5/tai5-uan5_gian5-gi2_hok8-bu7

匯大音檔siunn慢

Closed this issue · 0 comments

因為需要知影音檔長度,大音檔讀足慢閣濟句

  File "/home/venv/lib/python3.7/site-packages/臺灣言語服務/models.py", line 45, in 加一堆資料
    一筆.full_clean()
  File "/home/venv/lib/python3.7/site-packages/django/db/models/base.py", line 1188, in full_clean
    self.clean()
  File "/home/venv/lib/python3.7/site-packages/臺灣言語服務/models.py", line 64, in clean
    檢查聽拍結束時間有超過音檔無(self.聲音檔().時間長度(), self.聽拍)
  File "/home/venv/lib/python3.7/site-packages/臺灣言語服務/models.py", line 56, in 聲音檔
    return 聲音檔.對檔案讀(self.影音所在)
  File "/home/venv/lib/python3.7/site-packages/臺灣言語工具/語音辨識/聲音檔.py", line 16, in 對檔案讀
    原始資料 = wave音檔.readframes(wave音檔.getnframes())
  File "/usr/lib/python3.7/wave.py", line 243, in readframes
    data = self._data_chunk.read(nframes * self._framesize)
  File "/usr/lib/python3.7/chunk.py", line 136, in read
    data = self.file.read(size)
  File "/usr/lib/python3.7/chunk.py", line 136, in read
    data = self.file.read(size)

考慮
https://github.com/bastibe/SoundFile
https://librosa.github.io/librosa/tutorial.html