因此,我在网上阅读了无数关于 Git LFS 及其工作原理的文章,但仍然无法为我的问题找到最终的解决方案。基本上,我正在使用 Mozilla Deepspeech,我正在尝试通过 Github 将我的项目上传到 Heroku。但是,由于 Deepspeech 文件很大,必须使用 Git LFS 上传。这很好,除了现在当我访问文件路径时,我收到指向具有 SHA256 ID 的文件的指针,而不是实际的二进制文件。我想知道是否没有办法解决这个问题,或者是否可以接收实际的文件内容。谢谢您的帮助。代码如下(顺便说一句,这是正确的路径)
const DeepSpeech = require('deepspeech')
let modelPath = './deepspeech/deepspeech-0.9.3-models.pbmm'
let scorerPath = './deepspeech/deepspeech-0.9.3-models.scorer'
let model = new DeepSpeech.Model(modelPath)
model.enableExternalScorer(scorerPath)
Data loss: Corrupted memmapped model file: ./deepspeech/deepspeech-0.9.3-models.pbmm Invalid directory offset
throw `CreateModel failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`;
CreateModel failed: Failed to initialize memory mapped model. (0x3000)