openai whisper 语音识别,语音翻译
简介 Whisper 是openai开源的一个通用的语音识别模型,同时支持把各种语言的音频翻译为成英文(音频->文本)。 安装 apt install ffmpeg pip install -U openai-whisper 使用 指令 whisper video.mp4 whisper audio.flac audi…
Backend相关的开发实践、问题记录与技术笔记。
简介 Whisper 是openai开源的一个通用的语音识别模型,同时支持把各种语言的音频翻译为成英文(音频->文本)。 安装 apt install ffmpeg pip install -U openai-whisper 使用 指令 whisper video.mp4 whisper audio.flac audi…
普通安装 安装zmq扩展 官方的 zmq 已多年不维护了,并且在php7.4中报错,所以只能选择第三方的了 wget https://github.com/stijnvdb88/php-zmq/archive/refs/tags/v4.3.4.tar.gz tar -xvzf php-zmq-4.3.4.tar.gz …
普通安装 https://github.com/janpfeifer/gonb#linux-and-mac-installation go install github.com/janpfeifer/gonb@latest && go install golang.org/x/tools/cmd/goimports@l…
Alembic 是 SQLAlchemy 的作者编写的数据库迁移工具。 安装配置 pip install alembic #初始化 alembic init {指定目录,比如 alembic } 配置 将 alembic.ini 中的 sqlalchemy.url 改为你数据库地址: sqlalchemy.url = …
SQLAlchemy 是 Python 的 SQL 工具包和 ORM 框架 安装 pip install SQLAlchemy 封装 #path: core/db/sqlite.py from sqlalchemy import create_engine from sqlalchemy.ext.declarative…
跨站点请求伪造(英语:Cross-site request forgery)是一种恶意利用,利用这种手段,代表经过身份验证的用户执行未经授权的命令。值得庆幸的是,Laravel 可以轻松保护您的应用程序免受跨站点请求伪造(CSRF)攻击。 漏洞的解释 如果您不熟悉跨站点请求伪造,我们讨论一个利用此漏洞的示例。假设您的应…
Install Poetry curl -sSL https://install.python-poetry.org | python3 - https://python-poetry.org/docs/#installing-with-the-official-installer 别名 cuiwei@weideMac…
通过 Laravel 用户认证 我们知道了 基于 api 的身份验证 ,实现方式有 Laravel Sanctum API 授权 、 Laravel 使用 Json Web Token(JWT) 等,今天介绍一下自定义中间件实现身份验证 中间件 使用中间件需要提前在 app/Http/Kernel.php 这里配置,分…
安装 安装 elasticsearch 官方扩展包 composer require elasticsearch/elasticsearch 以服务提供者的方式使用 elasticsearch 可以参考这篇文章: Laravel 以服务提供者的方式使用第三方扩展包 下面给出关键配置 config/es.php expl…
Query DSL Elasticsearch提供基于JSON的完整查询DSL(Domain Specific Language)来定义查询。 https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html 例如: GET /…