-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Update whisper-dictation extension #19989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Updated changelog before publishing - Ran prettier - Added a new Dictate command which only uses whisper, this allows for greater flexibility on how you call and use this extension. - Added option to Copy as well as Paste transcribed text. Added action to skip AI refinement entirely for session in dictate.tsx prompt selection menu. - Restored README to it\'s former glory - Merge branch \'contributions/merge-1749124014556\' - Pull contributions - Sync with fork
Thank you for the update! 🎉 You can expect an initial review within five business days. |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Major update to whisper-dictation extension adding a new simplified dictation command and enhanced transcription options.
- Added new
extensions/whisper-dictation/src/dictate-simple.tsx
providing streamlined transcription without AI refinement - Enhanced transcription preferences with new 'Copy & Paste Text' option in
package.json
for automatic clipboard handling - Renamed main command to 'DictateWithAICommand' in
extensions/whisper-dictation/src/dictate.tsx
for clarity - Added session-level AI refinement skip functionality with keyboard shortcuts
- Correctly formatted CHANGELOG.md entry at the top with
{PR_MERGE_DATE}
placeholder
6 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
Since this extension isn't on the Raycast Store, you'll need to install it from the source code: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: This contradicts line 72 which states the extension is available in the Raycast Store. Consider removing these source installation instructions or clarifying when source installation might be preferred.
Since this extension isn't on the Raycast Store, you'll need to install it from the source code: | |
Since this extension is now available to download from the [Raycast Store](https://www.raycast.com/finjo/whisper-dictation), you can install it directly from there. However, if you'd prefer to build from source, see below: |
const handlePasteAndCopy = useCallback( | ||
async (text: string) => { | ||
try { | ||
await Clipboard.copy(text); | ||
await Clipboard.paste(text); | ||
await showHUD("Copied and pasted transcribed text"); | ||
} catch (error) { | ||
console.error("Error during copy and paste:", error); | ||
await showToast({ | ||
style: Toast.Style.Failure, | ||
title: "Error", | ||
message: "Failed to copy and paste text", | ||
}); | ||
} | ||
await Promise.all([ | ||
cleanupAudioFile(), | ||
closeMainWindow({ clearRootSearch: true, popToRootType: PopToRootType.Immediate }), | ||
]); | ||
}, | ||
[cleanupAudioFile], | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider using showFailureToast
from @raycast/utils
instead of manual toast creation for error handling
const handlePasteAndCopy = useCallback( | |
async (text: string) => { | |
try { | |
await Clipboard.copy(text); | |
await Clipboard.paste(text); | |
await showHUD("Copied and pasted transcribed text"); | |
} catch (error) { | |
console.error("Error during copy and paste:", error); | |
await showToast({ | |
style: Toast.Style.Failure, | |
title: "Error", | |
message: "Failed to copy and paste text", | |
}); | |
} | |
await Promise.all([ | |
cleanupAudioFile(), | |
closeMainWindow({ clearRootSearch: true, popToRootType: PopToRootType.Immediate }), | |
]); | |
}, | |
[cleanupAudioFile], | |
); | |
const handlePasteAndCopy = useCallback( | |
async (text: string) => { | |
try { | |
await Clipboard.copy(text); | |
await Clipboard.paste(text); | |
await showHUD("Copied and pasted transcribed text"); | |
} catch (error) { | |
console.error("Error during copy and paste:", error); | |
showFailureToast(error, { title: "Failed to copy and paste text" }); | |
} | |
await Promise.all([ | |
cleanupAudioFile(), | |
closeMainWindow({ clearRootSearch: true, popToRootType: PopToRootType.Immediate }), | |
]); | |
}, | |
[cleanupAudioFile], | |
); |
Hi @Spuddy10345👋 Thanks for your contribution 🔥 You can reference images directly from |
… handling in src/hooks/useTranscription.ts
Okay I made these changes, apologies for the delay I had some issues pushing the changes made. |
Description
Added a new 'Dictate' command which will just perform plain transcription without any AI refinement performed. This allows users to assign transcription and refinement to different keyboard shortcuts. I also added a preference option to 'Default action after transcription' which both copies and pastes transcription results. This was a request and allows for quick pasting even when an active text field is not selected at time of transcription.
Changelog
Screencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder