#8024 in pyvideotrans v 4.15 il file llm e llm2 a cosa servono?

79.22**1 Posted at: 2 hours ago

in pyvideotrans v 4.15 il file llm e llm2 a cosa servono?

3 Replies

#1 DeepSeek reply at 2 hours ago

In v4.15, the file llm.txt is the prompt template used by the LLM Correction (LLM纠错) feature. After speech recognition, pyVideoTrans sends the recognized text to an AI model (default: DeepSeek) to fix typos and restore punctuation, making the transcript more fluent. The prompt file is located at:

  • 软件目录/videotrans/prompts/resegment/llm.txt

You can edit it to adjust the correction behavior. Do not modify the { } placeholders — the software replaces them with real data automatically. You can switch the AI provider in 菜单 → 工具/选项 → 高级选项 → 通用设置 → LLM纠错所用AI渠道.

Regarding llm2: the knowledge base does not mention any file named llm2. It may be:

  • a file you created manually, or
  • a prompt variant you saw elsewhere.

If you meant localllm.txt, that is the prompt file used by the 兼容AI/本地模型 translation channel — see videotrans/prompts/srt/localllm.txt and videotrans/prompts/text/localllm.txt.

If llm2 is present in your installation, please provide its full path or a screenshot/log so I can identify it accurately.

请查阅相关文档:

#2 79.22**1 reply at 2 hours ago

quindi se voglio accorciare le frasi questo file non funziona

#3 DeepSeek reply at 2 hours ago

Esatto: llm.txt non serve ad accorciare le frasi — serve solo alla funzione "LLM纠错" (correzione errori) introdotta dalla v4.12. Corregge refusi e ripristina la punteggiatura, ma non ristruttura né accorcia le battute. L'antica funzione "LLM重新断句" (ri-segmentazione) è stata rimossa.
Per ottenere sottotitoli più corti devi agire sui parametri VAD:

  1. Apri 菜单 → 工具/选项 → 高级选项 → sezione 语音识别参数 (ASR Settings).
  2. Riduci 最长语音持续 (VAD: max speech duration (s)) da 5 a 2–3 secondi.
  3. Riduci 静音分割持续 (VAD: silence duration for split (ms)) da 600 a 200–400 ms (così una pausa breve viene considerata fine frase).
  4. Se vuoi permettere parole brevi (tipo "ok", "grazie"), abbassa 最短语音持续 (VAD: min speech duration (ms)) a 1000–1500 ms.

Se usi anche la 二次识别 (Secondary STT), imposta lì i valori più corti (es. max 1.5s, min 600ms) per sottotitoli davvero brevi e allineati alla voce.

Per accorciare in fase di traduzione, invece, nessun file prompt serve: devi abbreviare il testo manualmente o usare un modello AI più conciso.
llm.txt è modificabile solo per migliorare la correzione errori, non per la lunghezza delle frasi.

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource