Comments (13)
需要安装:autohotkey V2
我把它封装exe并加到GUI里了,跟随start_client_gui.exe
一起启动停止,美滋滋🥰
from capswriter-offline.
自己折腾了一个,虽然效果不完美,但是比没有还是好一些的,这个效果还可以
from capswriter-offline.
键盘上的 caps lock 状态灯,不就是指示吗,如果按下亮起,松开灭掉,那就是表明录音成功
from capswriter-offline.
caps lock 状态灯 只能确认是否按下capslock
键,无法确认CapsWriter已启动 且当前正在语音输入状态,也无法确认当前输入位置;我觉得capslock状态灯 不能解决这个需求;而且看状态灯 需要低头看。
from capswriter-offline.
主要是没有这个状态提示,没有反馈,心里不踏实;如果按下按键就弹出图标提示,会有个即时的反馈,我觉得体验是会更好一些的。
from capswriter-offline.
在可见的未来两年内,我无法添加图形提示
from capswriter-offline.
@photkey 试试我这个,在tray有图标会不会安心点 #53
from capswriter-offline.
@H1DDENADM1N 你这个项目挺好的,用起来挺方便,但是对我这个需求帮助不大,一个是看托盘图标还是不够方便,另外一个是对于这个用途来说 跟下图的托盘图标其实效果也差不太多
期待你的GUI 能更新更多功能。
from capswriter-offline.
自己折腾了一个,虽然效果不完美,但是比没有还是好一些的,这个效果还可以
哇,这效果不错,代码能发下吗?
from capswriter-offline.
哇,这效果不错,代码能发下吗?
#Requires AutoHotkey v2.0
CoordMode("ToolTip", "Screen")
~CapsLock::{
if hwnd := GetCaretPosEx(&x, &y, &w, &h){
; 能够获取到文本光标时,提示信息在光标位置,且x坐标向右偏移5
x := x + 5
}
else{
; 获取不到文本光标时,提示信息在当前窗口的位置
WinGetPos &X, &Y, &W, &H, "A"
x := X + W * 0.25
y := Y + H * 0.7
}
ToolTip("✦语音输入中‧‧‧", x, y) ; 提示信息内容
KeyWait("CapsLock")
ToolTip()
return
}
GetCaretPosEx(&x?, &y?, &w?, &h?) {
x := h := w := h := 0
static iUIAutomation := 0, hOleacc := 0, IID_IAccessible, guiThreadInfo, _ := init()
if !iUIAutomation || ComCall(8, iUIAutomation, "ptr*", eleFocus := ComValue(13, 0), "int") || !eleFocus.Ptr
goto useAccLocation
if !ComCall(16, eleFocus, "int", 10002, "ptr*", valuePattern := ComValue(13, 0), "int") && valuePattern.Ptr
if !ComCall(5, valuePattern, "int*", &isReadOnly := 0) && isReadOnly
return 0
useAccLocation:
; use IAccessible::accLocation
hwndFocus := DllCall("GetGUIThreadInfo", "uint", DllCall("GetWindowThreadProcessId", "ptr", WinExist("A"), "ptr", 0, "uint"), "ptr", guiThreadInfo) && NumGet(guiThreadInfo, A_PtrSize == 8 ? 16 : 12, "ptr") || WinExist()
if hOleacc && !DllCall("Oleacc\AccessibleObjectFromWindow", "ptr", hwndFocus, "uint", 0xFFFFFFF8, "ptr", IID_IAccessible, "ptr*", accCaret := ComValue(13, 0), "int") && accCaret.Ptr {
NumPut("ushort", 3, varChild := Buffer(24, 0))
if !ComCall(22, accCaret, "int*", &x := 0, "int*", &y := 0, "int*", &w := 0, "int*", &h := 0, "ptr", varChild, "int")
return hwndFocus
}
if iUIAutomation && eleFocus {
; use IUIAutomationTextPattern2::GetCaretRange
if ComCall(16, eleFocus, "int", 10024, "ptr*", textPattern2 := ComValue(13, 0), "int") || !textPattern2.Ptr
goto useGetSelection
if ComCall(10, textPattern2, "int*", &isActive := 0, "ptr*", caretTextRange := ComValue(13, 0), "int") || !caretTextRange.Ptr || !isActive
goto useGetSelection
if !ComCall(10, caretTextRange, "ptr*", &rects := 0, "int") && rects && (rects := ComValue(0x2005, rects, 1)).MaxIndex() >= 3 {
x := rects[0], y := rects[1], w := rects[2], h := rects[3]
return hwndFocus
}
useGetSelection:
; use IUIAutomationTextPattern::GetSelection
if textPattern2.Ptr
textPattern := textPattern2
else if ComCall(16, eleFocus, "int", 10014, "ptr*", textPattern := ComValue(13, 0), "int") || !textPattern.Ptr
goto useGUITHREADINFO
if ComCall(5, textPattern, "ptr*", selectionRangeArray := ComValue(13, 0), "int") || !selectionRangeArray.Ptr
goto useGUITHREADINFO
if ComCall(3, selectionRangeArray, "int*", &length := 0, "int") || length <= 0
goto useGUITHREADINFO
if ComCall(4, selectionRangeArray, "int", 0, "ptr*", selectionRange := ComValue(13, 0), "int") || !selectionRange.Ptr
goto useGUITHREADINFO
if ComCall(10, selectionRange, "ptr*", &rects := 0, "int") || !rects
goto useGUITHREADINFO
rects := ComValue(0x2005, rects, 1)
if rects.MaxIndex() < 3 {
if ComCall(6, selectionRange, "int", 0, "int") || ComCall(10, selectionRange, "ptr*", &rects := 0, "int") || !rects
goto useGUITHREADINFO
rects := ComValue(0x2005, rects, 1)
if rects.MaxIndex() < 3
goto useGUITHREADINFO
}
x := rects[0], y := rects[1], w := rects[2], h := rects[3]
return hwndFocus
}
useGUITHREADINFO:
if hwndCaret := NumGet(guiThreadInfo, A_PtrSize == 8 ? 48 : 28, "ptr") {
if DllCall("GetWindowRect", "ptr", hwndCaret, "ptr", clientRect := Buffer(16)) {
w := NumGet(guiThreadInfo, 64, "int") - NumGet(guiThreadInfo, 56, "int")
h := NumGet(guiThreadInfo, 68, "int") - NumGet(guiThreadInfo, 60, "int")
DllCall("ClientToScreen", "ptr", hwndCaret, "ptr", guiThreadInfo.Ptr + 56)
x := NumGet(guiThreadInfo, 56, "int")
y := NumGet(guiThreadInfo, 60, "int")
return hwndCaret
}
}
return 0
static init() {
try
iUIAutomation := ComObject("{E22AD333-B25F-460C-83D0-0581107395C9}", "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}")
hOleacc := DllCall("LoadLibraryW", "str", "Oleacc.dll", "ptr")
NumPut("int64", 0x11CF3C3D618736E0, "int64", 0x719B3800AA000C81, IID_IAccessible := Buffer(16))
guiThreadInfo := Buffer(A_PtrSize == 8 ? 72 : 48), NumPut("uint", guiThreadInfo.Size, guiThreadInfo)
}
}
需要安装:autohotkey V2
from capswriter-offline.
需要安装:autohotkey V2
感谢,用上了,发现新天地呀
from capswriter-offline.
需要安装:autohotkey V2
我把它封装exe并加到GUI里了,跟随
start_client_gui.exe
一起启动停止,美滋滋🥰
好像有个BUG,运行start.exe
的时候hint_while_recording.exe
并不会自动启停,要单独运行start_client_gui.exe
才行。
from capswriter-offline.
好像有个BUG,运行
start.exe
的时候hint_while_recording.exe
并不会自动启停,要单独运行start_client_gui.exe
才行。
就是这样设计的,start.exe
调用的start.py
就没写启停hint_while_recording.exe
相关功能的代码😂。
另转录功能相关的代码也是只有start_client_gui.exe
才有哈。
这里有提到 服务端、客户端分离 的原因。start.exe
也不会再更新加入更多功能。
不过如果有需要你可以自己修改下start.py
,把相关代码段抄过去。
from capswriter-offline.
Related Issues (20)
- 关于长词无法准确识别的问题
- 最新 GUI 版本音视频生成字幕有问题 HOT 2
- 中英文识别错误
- 对于部分程序不支持直接输入
- 请问支持cuda吗?
- 安装好了 但是无法唤起音视频 转文字
- 不使用剪切板模式的时候,识别时有标点符号,但上屏没有
- 请问有 Mac 版吗
- use FunAudioLLM/SenseVoiceSmall and cuda version instead
- 爲何 Start_client 的檔案會被識別成病毒 HOT 1
- 想要在开始录音/结束录音的时候播放音效作为提示
- 可以加入支持显卡版本吗
- ubuntu22.04-源码运行-只有启动client后的第一次识别是正常的 HOT 4
- 好用!
- 现在有个新模型sensevoice听说更快更准确,可不可以用同样原理调用哪个模型呢? HOT 1
- 可以在规则里自定义标点符号吗
- 在微信中频繁使用导致微信被退出
- 更换一个字一个字的打模式不成功
- Ubuntu下的Client端无法连接Server HOT 2
- 大佬威武,能否抽空加自动区分说话人功能,每个人说完之后自动以粘贴的方式输出结果。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capswriter-offline.