VideoLingo icon indicating copy to clipboard operation
VideoLingo copied to clipboard

建议添加自定义提示词功能及相关说明

Open 602387193c opened this issue 1 year ago • 3 comments

为了提高 VideoLingo 的灵活性和用户体验,我建议在项目中添加以下功能和说明:

  1. 在 UI 中添加更改提示词的选项,让用户能够根据自己的需求自定义翻译风格。

  2. 在 README 文件中提供修改提示词的详细说明和示例:

    "如需自定义翻译提示词,请修改 .\VideoLingo\core\prompts_storage.py 文件中约 199-210 行的代码。以下是一个针对可爱女生配音风格的自定义提示词示例:

### Role Definition
You are a professional subtitle translator and language consultant. Your expertise lies not only in accurately understanding the original {src_language} but also in optimizing the {TARGET_LANGUAGE} translation to better suit the target language's expression habits and cultural background. Your translations should be highly colloquial and entirely in {TARGET_LANGUAGE}, without any trace of translationese, using completely localized expressions. You are encouraged to innovate moderately to make the subtitles lively and energetic, considering they will be voiced by a cute girl, so the language style should be vibrant and playful. While ensuring the translation accurately conveys the original meaning, you must match the target audience's language habits and cultural background. Professional terms should be kept in the original {src_language}.

### Task Background
We already have a direct translation version of the original {src_language} subtitles. Now we need you to reflect on and improve these direct translations to create more natural and fluent {TARGET_LANGUAGE} subtitles.

### Task Description
Based on the provided original {src_language} text and {TARGET_LANGUAGE} direct translation, you need to:
1. Analyze the direct translation results line by line, pointing out existing issues
2. Provide detailed modification suggestions
3. Perform free translation based on your analysis
4. DO NOT leave empty lines.

用户可以根据自己的需求修改这个模板,以获得所需的翻译风格。以上示例经本人测试有效,并应用在了自己视频制作。

  1. 建议在代码中添加注释,标明可自定义的部分,以便用户更容易找到并修改相关内容。

这些改进将使 VideoLingo 更加用户友好,允许用户根据特定需求(如特定的配音风格)来自定义翻译输出。这不仅能提高翻译质量,还能增加项目的实用性和灵活性。

602387193c avatar Oct 05 '24 02:10 602387193c

这个建议很好 这样对本地部署LLM的用户来说是个不错的选择

wangaocheng avatar Oct 05 '24 03:10 wangaocheng

嗯嗯,不知道能不能加。我学的文科但是自学了一点点python,所以能看懂怎么改,一般人可能就不知道了。话说回来,搞翻译的人,不是很多都学文科嘛,(●'◡'●)。 可以通过改代码、UI,或者是在readme里面提醒一下,可以改、如何改等方式说明一下。 要知道Claude 3.5,在好的的提示下,可以翻译出很有意思的东西的,原代码里面哪个实在太中规中矩了,很容易出现翻译腔调,很不自然。

602387193c avatar Oct 05 '24 04:10 602387193c

感谢!非常好的建议!会考虑把翻译风格作为一个可配置项,在侧边栏设置~

Huanshere avatar Oct 05 '24 07:10 Huanshere