现在位置: 首页  >  编程技术
原创 小说朗读器,使用windows系统自带的tts功能进行朗读
使用python调用系统的tts功能进行朗读 import pyttsx3   import threading   import tkinter as tk   from tkinter import messagebox   import time    # 小说的txt文件路径   NOVEL_FILE = '仙逆.txt'   ...
原创 批处理脚本调用ffmpeg转换音乐文件为mp3格式
安装ffmpeg后,直接将带转换的文件拖到这个脚本上就行 @echo off setlocal enabledelayedexpansion REM 检查是否存在 FFmpeg where ffmpeg >nul 2>nul if errorlevel 1 (     echo 请确保已经安装了 FFmpeg 并添加到了系统环境变量中。...
原创 ElasticSearch+php 基础使用示例
php7.4 + ElasticSearch-8.7.0 composer: "require": {     "elasticsearch/elasticsearch": "^8.7",     "ramsey/uuid": "^4.2" } <?php include './vendor/autoload.php'; ...
原创 ffmpeg将摄像头画面推rtsp流
FFmpeg https://ffmpeg.org/ EasyDarwin https://github.com/EasyDarwin/EasyDarwin/releases 1、运行 EasyDarwin 2、ffmpeg -f vfwcap -i 0 -vcodec libx264 -s 1280x720 -r 30 -f rtsp r...
原创 不安装vs的情况下快速安装face_recognition
要求python3.8 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip install  pyzbar #忽略 pip install opencv-contrib-python pip install opencv-python pip in...
原创 任意进制转换,配合 mb_ord() 可实现逐字加密
任意进制转换,只要把字典字符集填充够长,顺序打乱,配合 mb_ord() 可实现逐字加密。 function baseConvert($num,$fromBase=10,$toBase=95) {     if ($fromBase!=10){         $num=baseConvertReverse($num.'',$fromBase,10...
原创 用 BroadcastChannel 实现的一个消息总线
用 BroadcastChannel 实现的一个消息总线 const msgBus={     BcList:[],     getBcByName(name){         for (let i = 0; i < this.BcList.length; i++) {             if (this.BcList[i].na...
原创 js的async和await,与Promise的返回规则
function getSomething(n) {     return new Promise(resolve => {         // 模拟1s后返回数据         setTimeout(() => resolve(222), 1000);     }); } async function doit(){     con...
原创 js克隆对象
Object.prototype.clone = function clone() {    var copy = (this instanceof Array) ? [] : {};    for (attr in this) {        if (!obj.hasOwnProperty(attr)) continue;        copy[...
原创 windows系统自带的文本转语音功能
1、将下面代码保存为 tts.vbs set spvoice = CreateObject("SAPI.SpVoice") set spfilestream = CreateObject("SAPI.SpFileStream") set args = Wscript.Arguments wavfile = Replace(args(0), "/", "...
 站内搜索