Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker env[DEBUG] not work #104

Closed
Aliang-code opened this issue Aug 2, 2024 · 5 comments
Closed

docker env[DEBUG] not work #104

Aliang-code opened this issue Aug 2, 2024 · 5 comments

Comments

@Aliang-code
Copy link

I can already see the DEBUG variable I set in the container, but still don't have any debug log output when I post request /jellyfin because it didn't start when the media is automatically added, with env PROCADDEDMEDIA=False SKIPIFINTERNALSUBLANG=chi SKIPIFEXTERNALSUB=True, so i need see the debug logs

root@fd091c0a463d:/subgen# echo $DEBUG
True
subgen.env file not found. Please run prompt_and_save_env_variables() first.

subgen.py exists and UPDATE is set to False, skipping download.

Launching subgen.py

File subgen.env not found. Environment variables not set.

File subgen.env not found. Environment variables not set.

INFO:root:Subgen v2024.7.13.88

INFO:root:Starting Subgen with listening webhooks!

INFO:root:Transcriptions are limited to running 2 at a time

INFO:root:Running 4 threads per transcription

INFO:root:Using cpu to encode

INFO:root:Using faster-whisper

�[32mINFO�[0m:     Started server process [�[36m27�[0m]

�[32mINFO�[0m:     Waiting for application startup.

�[32mINFO�[0m:     Application startup complete.

�[32mINFO�[0m:     Uvicorn running on �[1mhttp://0.0.0.0:9000�[0m (Press CTRL+C to quit)

�[32mINFO�[0m:     192.168.1.251:55520 - "�[1mPOST /jellyfin HTTP/1.1�[0m" �[32m200 OK�[0m
@McCloudS
Copy link
Owner

McCloudS commented Aug 2, 2024

You would want PROCADDEDMEDIA=False to be true if you want it to run on a file being added to the library.

@Aliang-code
Copy link
Author

You would want PROCADDEDMEDIA=False to be true if you want it to run on a file being added to the library.

yes,I informed its usage after checking the source code, but the description in the readme is a little confusing.

@Aliang-code
Copy link
Author

You would want PROCADDEDMEDIA=False to be true if you want it to run on a file being added to the library.

After a day of intensive use, I think I'm close to my goal: generating Chinese subtitles for those English videos where subtitles cannot be found.
Even though I know whisper doesn't officially support translation to other languages,but it does work.
The only problem is that after a long period of transcription, once multiple English words appear in the context (such as name), the subsequent output will all become English.
However, the built-in silero-vad of faster_whisper solved this problem to a certain extent after splitting the fragments, and then adjusted the prompt_reset_on_temperature parameter. Now it works very well for me, so can you provide these two parameters to the env configuration?

model.transcribe_stable(file_path, vad=True, prompt_reset_on_temperature=0.35, language=force_language, task=transcription_type, progress_callback=progress, initial_prompt=custom_model_prompt, regroup=custom_regroup)

My transcription result example for Dinosaurs (1991) S1E4

  • default to vad=False, prompt_reset_on_temperature=0.5
[00:03:39,500 --> 00:03:42,160]	他面前有雕塑
[00:03:42,160 --> 00:03:43,328]	Gary
[00:03:44,096 --> 00:03:45,888]	他的名字是Gary
[00:03:46,350 --> 00:03:48,224]	Terror有个新的名字
[00:03:48,560 --> 00:03:49,376]	Gary
[00:03:50,140 --> 00:03:51,280]	这是个好地方
[00:03:53,024 --> 00:03:54,160]	从法律部长
[00:03:54,160 --> 00:03:55,700]	Spikeback
[00:03:55,700 --> 00:03:56,580]	Ribcrusher
[00:03:56,580 --> 00:03:57,440]	Fenske
[00:03:58,560 --> 00:03:59,840]	Dear Mr. Sinclair
[00:03:59,840 --> 00:04:00,860]	I'm writing to you
[00:04:00,860 --> 00:04:02,800]	on behalf of my client Gary
[00:04:02,800 --> 00:04:04,160]	who met your wife
[00:04:04,160 --> 00:04:05,100]	at the supermarket
[00:04:05,100 --> 00:04:06,600]	and who would like to take her
[00:04:06,600 --> 00:04:07,660]	as his mate
[00:04:07,660 --> 00:04:09,860]	under section 412
[00:04:09,860 --> 00:04:10,740]	article 9
[00:04:10,740 --> 00:04:11,990]	of the code of the wilderness
... After that it’s all in English
  • after set vad=True, prompt_reset_on_temperature=0.35
[00:03:39,480 --> 00:03:42,160]	他面前有雕像
[00:03:42,160 --> 00:03:43,328]	Gary
[00:03:44,096 --> 00:03:45,856]	他的名字是Gary
[00:03:46,880 --> 00:03:48,192]	Terror有个新的名字
[00:03:48,900 --> 00:03:49,376]	Gary
[00:03:50,016 --> 00:03:51,400]	那是个好地方
[00:03:53,024 --> 00:03:54,160]	从法律部队
[00:03:54,160 --> 00:03:55,700]	有Spikeback
[00:03:55,700 --> 00:03:56,580]	Ribcrusher
[00:03:56,580 --> 00:03:57,440]	和Fenske
[00:03:58,560 --> 00:03:59,900]	亲爱的Mr. Sinclair
[00:04:00,032 --> 00:04:02,200]	在我客户面前
[00:04:02,200 --> 00:04:02,816]	Gary
[00:04:03,040 --> 00:04:05,120]	他在市场上
[00:04:05,120 --> 00:04:06,600]	他想要把她
[00:04:06,600 --> 00:04:08,032]	当他妻子
[00:04:08,352 --> 00:04:09,740]	在412条
[00:04:09,740 --> 00:04:10,700]	第九章
[00:04:10,700 --> 00:04:12,096]	《地狱文章》
... no longer English here

@McCloudS
Copy link
Owner

McCloudS commented Aug 3, 2024

I haven't had time to extensively test this yet, but give it a shot. I added a SUBGEN_KWARGS env variable. You should be able to override or add most options.

It’s a simple kwarg dictionary.

So if you set it to: {'vad': 'True','prompt_reset_on_temperature': '0.35'} it ought to get you close. I tested loosely on unraid and it didn't throw errors outright.

I don't want to document it until it's known to be working.

@Aliang-code
Copy link
Author

I haven't had time to extensively test this yet, but give it a shot. I added a SUBGEN_KWARGS env variable. You should be able to override or add most options.

It’s a simple kwarg dictionary.

So if you set it to: {'vad': 'True','prompt_reset_on_temperature': '0.35'} it ought to get you close. I tested loosely on unraid and it didn't throw errors outright.

I don't want to document it until it's known to be working.

thx, it works well !

environment:
  - "SUBGEN_KWARGS={'vad': True,'prompt_reset_on_temperature': 0.35}"

@McCloudS McCloudS closed this as completed Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants