hcfyapp / hcfy-desktop Goto Github PK
View Code? Open in Web Editor NEW划词翻译(桌面端)正在开发当中,此仓库的 issues 区域将作为未来反馈问题与提供建议的地方。
划词翻译(桌面端)正在开发当中,此仓库的 issues 区域将作为未来反馈问题与提供建议的地方。
划词翻译(桌面端)的语音翻译功能需要用到语音识别 API 将语音转为文字,我希望能有人开发一个直接使用操作系统的语音识别 API 的 Node.js 模块。
开发一个能调用操作系统的语音识别 API 的 Node.js 模块。
有两种方式可以开发出这个模块。
用 N-API 的话,需要用 C/C++ 来调用操作系统的接口,然后使用 N-API 包装成 Node.js 的模块。
Node.js 是可以执行命令行的,所以也可以分别给不同的操作系统开发对应的命令行工具,然后我来写 Node.js 调用它。
比如在 macOS 上用 Swift 或 Object-C 开发一个命令行工具,在 Windows 上就开发一个 .exe 文件。
例如 https://github.com/sindresorhus/clipboardy 这个项目,在 Windows 上是用 Node.js 调用了一个 .exe 文件来读写剪切板:https://github.com/sindresorhus/clipboardy/blob/main/lib/windows.js
为了能实现在其它程序内划词后触发翻译的功能,划词翻译(桌面端)需要有响应操作系统层面的鼠标事件的能力。划词翻译(桌面端)是用 Electron 开发的,目前有两个库能提供此能力,但都有一些问题。
比较流行的是 iohook,但它已经好几年没人维护了,有很多 bug,且用的不是 N-API,以致于每次升级 Electron 的大版本都需要重新编译。
iohook 实际上是对 libuiohook 这个 C 库的 Node.js Native Module 封装(庆幸的是 libuiohook 仍然在积极更新中),uiohook-napi 也是如此,但它用了 N-API,所以可以跨 Electron 的版本使用,无需重新编译。
但是,uiohook-napi 内置的 libuiohook 是两年前的版本了,所以现在用也有一些 bug。
我希望有熟悉 C/C++ 的人将 uiohook-napi 内的 libuiohook 升级到最新版本。
我自己已经尝试过升级了,虽然能成功编译且似乎能正常使用,但由于我不熟 Node.js 的 N-API、更不熟 C/C++,所以我不确定这样简单的更新 libuiohook 的代码有没有问题。
划词翻译(桌面端)的截图翻译功能需要用到 OCR,我希望能有人开发一个能直接使用操作系统的 OCR 接口的 Node.js 模块。
开发一个能调用操作系统的 OCR 接口的 Node.js 模块。
有两种方式可以开发出这个模块。
用 N-API 的话,你需要用 C/C++ 来调用操作系统的接口,然后使用 N-API 包装成 Node.js 的模块。
Node.js 是可以执行命令行的,所以也可以分别给不同的操作系统开发对应的命令行工具,然后我来写 Node.js 调用它。
比如在 macOS 上用 Swift 或 Object-C 开发一个命令行工具,在 Windows 上就开发一个 .exe 文件。
例如 https://github.com/sindresorhus/clipboardy 这个项目,在 Windows 上是用 Node.js 调用了一个 .exe 文件来读写剪切板:https://github.com/sindresorhus/clipboardy/blob/main/lib/windows.js
这个命令行工具需要接收的参数有:
输出文字就行。
这是一个用 Swift 开发的 OCR API 命令行工具:https://github.com/ughe/macocr 但是没有文档,也不知道要怎么用
这是一个 Windows 的 OCR API 命令行工具:https://github.com/zh-h/Windows.Media.Ocr.Cli 但上次维护是 4 年前了,未测试可用性
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.