jianchang512 / pyvideotrans

Translate the video from one language to another and add dubbing. 将视频从一种语言翻译为另一种语言,并支持api调用
https://pyvideotrans.com
GNU General Public License v3.0
10.21k stars 1.13k forks source link

语音分割问题 #436

Closed ztwe closed 3 months ago

ztwe commented 3 months ago

语音识别后是下面这样。语音分割导致完整句子被分割得支离破碎,进而影响后面的翻译、TTS、hebing,最后视频质量不高,有什么设置或办法可以完善 语音分割?还是说只能在语音识别后,用户手动调整文字?

1 00:00:00,000 --> 00:00:04,340 Leadership is perhaps one of the most misunderstood subjects in business.

2 00:00:05,530 --> 00:00:11,920 Leadership has nothing to do with rank. I know many people who sit at the highest levels of

3 00:00:11,920 --> 00:00:19,880 an organization who are not leaders. We do as they tell us because they have authority over us,

4 00:00:20,360 --> 00:00:27,280 but we do not trust them and we do not follow them. I also know people at low levels of

5 00:00:27,280 --> 00:00:33,880 organizations that have no formal authority, but they've made a choice. The choice to look

6 00:00:33,880 --> 00:00:38,080 the person to the left of them, the choice to look after the person to the right of them,

7 00:00:38,420 --> 00:00:45,550 and we would trust them and follow them anywhere. Leadership is the awesome responsibility

8 00:00:46,150 --> 00:00:53,960 to see those around us rise. You, every one of us, can choose to be the leader we wish we had.

9 00:00:55,160 --> 00:01:01,160 We lead our teams and we can lead our clients when we decide that we will do everything in

10 00:01:01,160 --> 00:01:06,280 power to see them rise, to see them achieve their ambitions and their dreams.

11 00:01:06,900 --> 00:01:08,980 And this is what servant leadership means.

12 00:01:09,460 --> 00:01:14,200 I serve your dream rather than you serve my bottom line.

13 00:01:15,600 --> 00:01:18,560 And it's totally fine to have financial goals.

14 00:01:18,620 --> 00:01:24,500 It's totally fine to have metrics because that becomes the proof of value that somebody

15 00:01:24,500 --> 00:01:27,580 wants to give you their money because they believe in you.

16 00:01:28,300 --> 00:01:29,760 It is proof positive.

17 00:01:29,800 --> 00:01:37,040 But the best leaders I know are students of leadership.

18 00:01:37,680 --> 00:01:39,980 There's no such thing as an expert leader. It doesn't exist.

19 00:01:40,460 --> 00:01:44,140 Like there's no such thing as an expert parent. It doesn't exist.

20 00:01:45,260 --> 00:01:47,060 We are students of leadership.

21 00:01:47,540 --> 00:01:53,330 And even the most senior leaders constantly are reading books,

22 00:01:54,240 --> 00:01:59,580 reading articles, watching talks, having conversations all the time about leadership.

23 00:01:59,800 --> 00:02:01,300 They're always in learning mode.

24 00:02:01,340 --> 00:02:06,840 And I think for anyone who wants to be a leader, you have to choose to be a student of the

25 00:02:06,840 --> 00:02:07,820 subject, like anything.

26 00:02:07,920 --> 00:02:10,380 If you want to be good at something, you have to study it.

27 00:02:10,800 --> 00:02:18,660 And the most ignored characteristic of leadership, you know, we talk about vision and charisma.

28 00:02:19,060 --> 00:02:20,360 Yes, these are important.

29 00:02:20,980 --> 00:02:25,420 But I've known some wonderful leaders who don't have huge, world-changing visions.

30 00:02:25,880 --> 00:02:31,700 I've known some wonderful leaders that are quiet and sit in the corner, but they all

31 00:02:31,700 --> 00:02:36,560 have courage, the courage to advance a vision,

32 00:02:36,860 --> 00:02:40,300 the courage to ignore the short-term ups and downs

33 00:02:40,300 --> 00:02:43,740 of the business, the courage to take risks on people,

34 00:02:44,360 --> 00:02:49,340 the courage to believe in people, the courage to speak truth to power,

35 00:02:50,000 --> 00:02:52,760 the courage to do the right thing and have integrity.

36 00:02:53,600 --> 00:02:56,180 I think courage is a very undervalued

37 00:02:56,180 --> 00:02:57,380 characteristic of leadership.

jianchang512 commented 3 months ago

https://pyvideotrans.com/adv.html

调整VAD分割配置

; ###############语句分割相关##################################

;用于 预先分割 和 整体识别 时,作为切割依据的最小静音片段ms,默认200ms 以及最大句子时长3s overall_silence=200 overall_maxsecs=3

videotrans/set.ini

;用于均等分割时,作为切割依据的最小静音片段ms,默认200ms,即只有大于等于200ms的静音处才分割 voice_silence=200 ;用于均等分割时的每个切片时长 秒,默认 6s,即每个字幕时长大约都是6s interval_split=6