Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Spuddy10345
Copy link
Contributor

@Spuddy10345 Spuddy10345 commented Jun 23, 2025

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

## [0.1.1] - {PR_MERGE_DATE}

### Added
- Preference to both copy and paste transcribed text automatically
- Added separate commands for dictation and dictation with AI refinement
  - This gives more flexibility and how and when each command is called
- Added shortcut to skip refinement for a session during the prompt selection menu (if configured)

Screencast

Checklist

- 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
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: whisper-dictation Issues related to the whisper-dictation extension OP is author The OP of the PR is the author of the extension labels Jun 23, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Jun 23, 2025

Thank you for the update! 🎉

You can expect an initial review within five business days.

Copy link

socket-security bot commented Jun 23, 2025

@Spuddy10345 Spuddy10345 marked this pull request as ready for review June 23, 2025 17:19
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Comment on lines 80 to 81
Since this extension isn't on the Raycast Store, you'll need to install it from the source code:

Copy link
Contributor

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.

Suggested change
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:

Comment on lines 74 to 94
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],
);
Copy link
Contributor

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

Suggested change
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],
);

@pernielsentikaer
Copy link
Collaborator

Hi @Spuddy10345👋

Thanks for your contribution 🔥

You can reference images directly from metadata, you don't need to add them again in media 😊

@pernielsentikaer pernielsentikaer self-assigned this Jun 24, 2025
… handling in src/hooks/useTranscription.ts
@Spuddy10345
Copy link
Contributor Author

Okay I made these changes, apologies for the delay I had some issues pushing the changes made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension fix / improvement Label for PRs with extension's fix improvements extension: whisper-dictation Issues related to the whisper-dictation extension OP is author The OP of the PR is the author of the extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants