随笔分类 - 计算机技术
摘要:语音问答助手 from multiprocessing import Process from threading import Thread import os import json import whisper import zhconv from pyaudio import PyAudio
阅读全文
摘要:import sys import os from collections import OrderedDict from docx import Document import win32com.client # https://zhuanlan.zhihu.com/p/317074324,Pyt
阅读全文
摘要:模型的命名方式:模型名称_用户名称_仓库名称.gguf DeepSeek-R1-Distill-Llama-8B-Q2_K_L_unsloth_DeepSeek-R1-Distill-Llama-8B-GGUF.gguf 问他问题,他一直回复:“请告诉我问题和需求,请给我细节”,教我怎么使用,却不告
阅读全文
摘要:跟官方示例相同的操作内容 根据https://github.com/vikhyat/moondream/tree/main \ 的样例程序,从https://hf-mirror.com/vikhyatk/moondream2/blob/onnx/moondream-2b-int8.mf.gz \ 下
阅读全文
摘要:https://hf-mirror.com/PramaLLC/BEN/tree/main 下载模型和代码,能抠出三次元和二次元的人像 创建于2501281429,修改于2501281429
阅读全文
摘要:来自项目https://gitee.com/mirrors_nagadomi/lbpcascade_animeface import cv2 import sys import os.path def detect(filename, cascade_file = "./lbpcascade_ani
阅读全文
摘要:项目地址:https://gitee.com/ailemon/ASRT_SpeechRecognition 通过观察evaluate_speech_model.py的代码,知道DataLoader加载asrt_config.json配置项,进而加载数据内容。复制json配置文件,在数据类“dev”下
阅读全文
摘要:文本预处理 with open('C:/Users/tellw/Desktop/假面山庄杀人事件.txt',encoding='utf8') as f: contents=f.read() contents=''.join(contents.split('\n')) import re import
阅读全文
摘要:下载SakuraLLM模型 鉴于显存为6G,下载20241012-Qwen2.5-1.5B-v1.0模型,去https://hf-mirror.com/SakuraLLM/Sakura-1.5B-Qwen2.5-v1.0-GGUF/tree/main下载gguf文件。set CUDA_VISIBLE
阅读全文
摘要:import subprocess import os import whisper import zhconv import json def time2ffmpeg_time(ti): h=int(ti//3600) ti%=3600 m=int(ti//60) ti%=60 s=int(ti)
阅读全文
摘要:import wave import sys import json from vosk import Model, KaldiRecognizer, SetLogLevel # You can set log level to -1 to disable debug messages SetLog
阅读全文
摘要:def download_file(url, filename): """将链接中的数据存储入文件中。 Args: url: 链接。 filename: 文件路径名。 Raises: KeyboardInterrupt: 用户按^C引发异常。 Exception: 发生异常。 """ if os.p
阅读全文
摘要:寻找扬声器声音的可录制接口 import sounddevice as sd import wave import os devices=sd.query_devices() print(devices) for i in range(len(devices)): wf=wave.open(f'te
阅读全文
摘要:DIM数据获取页 https://ruisan.blog.jp/b.html 教学原帖 https://ruisan.blog.jp/archives/9756028.html 以上为原文作者所贴,鉴于网络问题,价值不太大 bin数据获取:https://vbevo.wordpress.com/20
阅读全文
摘要:import fitz # PyMuPDF import re from pathlib import Path from colorama import Fore import sys import os def search_pdf(pdf_path, format,keywords,conte
阅读全文
摘要:def isIncrement(ls,guanxing=0.1): if len(ls)<2: return False o=0 score=0 cha=[ls[i+1]-ls[i] for i in range(len(ls)-1)] for i in range(len(cha)): if o*
阅读全文
摘要:from functools import wraps import time class CacheManager: def __init__(self): self._cache = {} def get_cache_obj(self, key): """获取缓存对象""" return sel
阅读全文
摘要:下载graphviz,下载二进制包即可,将解压后的目录/bin添加到环境变量中 dot -Tjpg obj.dot -o obj.jpg将dot文件转成图片,查看 dot -Tsvg obj.dot查看svg内容 如何可视化dot文件 创建于2411071647,修改于2411071647
阅读全文
摘要:tracemalloc 为python代码{%code%}添加如下代码: import tracemalloc tracemalloc.start() f=open('mem_size.txt','w',encoding='utf8') while-clause: {% code %} snapsh
阅读全文