分类目录归档:AI

LMStudio配合Subtitle Edit实现字幕自动翻译

最近下了部新剧(俄剧),MKV格式带俄语字幕。过去对于纯生肉的片源,只能采用videosrt工具,使用在线语音识别引擎和翻译引擎进行翻译。但是对于有原生字幕的文件,则有更好的方法本地翻译。

Step 1

使用MKVToolNix导出字幕文件。
使用命令行.\mkvextract.exe tracks video.mkv 3:video.srt
其中3是字幕所在轨道。

Step 2

继续阅读

windows下安装llama-cpp-python失败的处理

想尝试python使用llama-cpp的功能,在windows下安装llama-cpp-python时,会报错。

PS C:\Users\xxxx> pip install llama-cpp-python
...
...
Building wheels for collected packages: llama-cpp-python
  Running command Building wheel for llama-cpp-python (pyproject.toml)
  *** scikit-build-core 0.9.9 using CMake 3.30.1 (wheel)
  *** Configuring CMake...
  2024-07-31 15:38:35,991 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
  loading initial cache file C:\Users\xxxx\AppData\Local\Temp\tmp95k50mhv\build\CMakeInit.txt
  -- Building for: NMake Makefiles
  CMake Error at CMakeLists.txt:3 (project):
    Running

     'nmake' '-?'

    failed with:

     no such file or directory

  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
...
...

继续阅读