type
Post
status
Published
date
Jul 2, 2021
slug
summary
tags
category
学习笔记
icon
password
 
这个foobar插件最方便
 
解包3D模型
一个叫 Noesis 的软件
 
 
 
有人分析过程序目录信息
 
 

AI 语音翻译

 
需要安装cuda 支持
这样渲染速度会快很多
 
python部分的代码全程用 chatGPT 帮写
import os import json import whisper import time # 加载Whisper模型 model = whisper.load_model("base") # 待转录音频文件所在目录路径 directory = r"J:/2023-04-15_voices/haruhi_aac" # 转录文本保存到JSON文件中的路径和文件名 json_file = 'haruhi_transcriptions.json' # 如果JSON文件存在,则读取其中的内容 if os.path.exists(json_file): with open(json_file, 'r', encoding='utf-8') as f: transcription_dict = json.load(f) else: # 如果JSON文件不存在,则创建一个空字典 transcription_dict = {} # 统计待转录音频文件总数 total_files = 0 for filename in os.listdir(directory): if filename.endswith(".m4a") and filename not in transcription_dict: total_files += 1 # 定义一个函数,用于保存转录结果到JSON文件中 def save_transcriptions(transcription_dict, json_file): with open(json_file, 'w', encoding='utf-8') as f: json.dump(transcription_dict, f, ensure_ascii=False, indent=2) print(f"已保存转录结果到{json_file}") if total_files == 0: print("没有需要转录的文件") else: # 记录已经转录的文件数量和单次处理时间的列表 count = 0 process_times = [] # 遍历待转录音频文件 for filename in os.listdir(directory): # 只处理.m4a格式的音频文件 if filename.endswith(".m4a") and filename not in transcription_dict: # 进行转录并将结果添加到字典中 filepath = os.path.join(directory, filename) start_time = time.time() result = model.transcribe(filepath, language='Japanese') process_time = time.time() - start_time process_times.append(process_time) transcription_text = result["text"] transcription_dict[filename] = transcription_text # 增加转录文件计数器的值 count += 1 # 计算剩余文件数量和平均单次处理时间 remaining_files = total_files - count average_time = sum(process_times) / len(process_times) remaining_time = remaining_files * average_time # 打印出剩余时间、剩余文件数量、文件名和转录文本 print(f"---------------------------------") print(f"文件名:{filename}", transcription_text) print(f"本次:{process_time:.2f}秒、平均:{average_time:.2f}秒") print(f"还剩 {remaining_files} 个文件、预计总时长:{remaining_time:.2f}秒") # 每10个文件保存一次转录结果到JSON文件中 if count % 10 == 0: save_transcriptions(transcription_dict, json_file) # 最后再保存一次转录结果到JSON文件中 save_transcriptions(transcription_dict, json_file)
 
京都动画作品圣地所在地在 canvas 上绘制压感线条

NotionNext
NotionNext
一个普通的干饭人🍚
公告
type
Notice
status
Published
date
Jul 2, 2021
slug
summary
类型为Notice的文章将被显示为公告,仅 hexo和next支持;仅限一个公告
tags
category
icon
password
🎉NotionNext 3.12已上线🎉
-- 新版本特性 ---
字体完全自定义
支持自定义样式、脚本
支持公告栏功能
-- 感谢您的支持 ---
👏欢迎更新体验👏