the silence man,

本文探讨了在领导者滔滔不绝时保持冷静与沉默的重要性。通过简短的指导建议,文章鼓励读者在面对喋喋不休的领导时学会适时沉默,保持内心的平和。
if your leader just keep saying a lot of stuff for you ,just not talk too much ,keep  quiet.keep calm,keep quiet.say nothing.let it go.
root@ecm-e00f:/# cat /etc/apparmor.d/usr.bin.man # vim:syntax=apparmor #include <tunables/global> /usr/bin/man { #include <abstractions/base> # Use a special profile when man calls anything groff-related. We only # include the programs that actually parse input data in a non-trivial # way, not wrappers such as groff and nroff, since the latter would need a # broader profile. /usr/bin/eqn rmCx -> &man_groff, /usr/bin/grap rmCx -> &man_groff, /usr/bin/pic rmCx -> &man_groff, /usr/bin/preconv rmCx -> &man_groff, /usr/bin/refer rmCx -> &man_groff, /usr/bin/tbl rmCx -> &man_groff, /usr/bin/troff rmCx -> &man_groff, /usr/bin/vgrind rmCx -> &man_groff, # Similarly, use a special profile when man calls decompressors and other # simple filters. /{,usr/}bin/bzip2 rmCx -> &man_filter, /{,usr/}bin/gzip rmCx -> &man_filter, /usr/bin/col rmCx -> &man_filter, /usr/bin/compress rmCx -> &man_filter, /usr/bin/iconv rmCx -> &man_filter, /usr/bin/lzip.lzip rmCx -> &man_filter, /usr/bin/tr rmCx -> &man_filter, /usr/bin/xz rmCx -> &man_filter, # Allow basically anything in terms of file system access, subject to DAC. # The purpose of this profile isn't to confine man itself (that might be # nice in the future, but is tricky since it's quite configurable), but to # confine the processes it calls that parse untrusted data. /** mrixwlk, unix, capability setuid, capability setgid, # Ordinary permission checks sometimes involve checking whether the # process has this capability, which can produce audit log messages. # Silence them. deny capability dac_override, deny capability dac_read_search, signal peer=@{profile_name}, signal peer=/usr/bin/man//&man_groff, signal peer=/usr/bin/man//&man_filter, # Site-specific additions and overrides. See local/README for details. #include <local/usr.bin.man> } profile man_groff { #include <abstractions/base> # Recent kernels revalidate open FDs, and there are often some still # open on TTYs. This is temporary until man learns to close irrelevant # open FDs before execve. #include <abstractions/consoles> # man always runs its groff pipeline with the input file open on stdin, # so we can skip <abstractions/user-manpages>. /usr/bin/eqn rm, /usr/bin/grap rm, /usr/bin/pic rm, /usr/bin/preconv rm, /usr/bin/refer rm, /usr/bin/tbl rm, /usr/bin/troff rm, /usr/bin/vgrind rm, /etc/groff/** r, /etc/papersize r, /usr/lib/groff/site-tmac/** r, /usr/share/groff/** r, /tmp/groff* rw, signal peer=/usr/bin/man, # @{profile_name} doesn't seem to work here. signal peer=/usr/bin/man//&man_groff, } profile man_filter { #include <abstractions/base> # Recent kernels revalidate open FDs, and there are often some still # open on TTYs. This is temporary until man learns to close irrelevant # open FDs before execve. #include <abstractions/consoles> /{,usr/}bin/bzip2 rm, /{,usr/}bin/gzip rm, /usr/bin/col rm, /usr/bin/compress rm, /usr/bin/iconv rm, /usr/bin/lzip.lzip rm, /usr/bin/tr rm, /usr/bin/xz rm, # Manual pages can be more or less anywhere, especially with "man -l", and # there's no harm in allowing wide read access here since the worst it can # do is feed data to the invoking man process. /** r, # Allow writing cat pages. /var/cache/man/** w, signal peer=/usr/bin/man, # @{profile_name} doesn't seem to work here. signal peer=/usr/bin/man//&man_filter, }
06-26
请帮我优化下这段代码“#解决 ImportError: DLL load failed while importing _kaldifst: 动态链接库(DLL)初始化例程失败。 import torch try: import ttsfrd use_ttsfrd = True except ImportError: print("failed to import ttsfrd, use wetext instead") from wetext import Normalizer as ZhNormalizer from wetext import Normalizer as EnNormalizer use_ttsfrd = False import sys sys.path.append('third_party/Matcha-TTS') from cosyvoice.cli.cosyvoice import CosyVoice2 from cosyvoice.utils.file_utils import load_wav import torchaudio import os from cosyvoice.utils.common import set_all_random_seed ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR)) cosyvoice = CosyVoice2('pretrained_models/CosyVoice2-0.5B', load_jit=False, load_trt=False, fp16=False) # 随机种子设置 seed = 20 set_all_random_seed(seed) # # 合成音频 tts_onespeech_list = [ 'the man in black pants', 'please leave quickly.', ] for i,j in enumerate(cosyvoice.inference_sft('the man in black pants please leave quickly', '英文女', stream=False)): torchaudio.save('result/split_test_result/seed10/the man in black pants please leave quickly.wav', j['tts_speech'], cosyvoice.sample_rate) # 读取音频 pre_path = 'result/split_test_result/seed10' input_files = ["zero_shot_0.wav", "zero_shot_1.wav"] waveforms = [] silence_duration = 0.15 for file_path in input_files: file_path = os.path.join(pre_path, file_path) speech, sample_rate = torchaudio.load(file_path, backend='soundfile') waveforms.append(speech) # 静音片段 silence_frames = int(silence_duration * sample_rate) num_channels = waveforms[0].size(0) silence = torch.zeros(num_channels, silence_frames) # 添加静音 final_waveforms = [] for i, waveform in enumerate(waveforms[:-1]): # 处理除最后一段外的所有音频 # 添加静音 waveform_with_silence = torch.cat([waveform, silence], dim=1) final_waveforms.append(waveform_with_silence) final_waveforms.append(waveforms[-1]) waveforms = final_waveforms # 合并音频 merged_wave = torch.cat(waveforms, dim=1) save_path = os.path.join(pre_path, 'zero_shot_silence.wav') torchaudio.save(save_path, merged_wave, sample_rate) ”,实现可以修改seed种子对应修改文件的保存路径,并且保存的音频文件名为对应的文本,可以同时合并得到包含静音间隔和不包含间隔的整合音频。
11-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值