Skip to content
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

Add bulk actions to trigger text to speech generation #477

Merged
merged 4 commits into from
Jun 7, 2023
Merged

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Jun 2, 2023

Description of the Change

A text-to-speech feature was added in #403. We missed adding bulk action support for that, so this PR adds that, matching how we've done this for other features.

If the text-to-speech feature is enabled for a post type, you'll now see two new options to trigger this:

  1. In the Bulk actions dropdown, there is a new Text to speech option. This will run the text-to-speech generation on whichever items you have selected
Bulk action support
  1. Hovering over an individual item in the post lists table, there's a new Text to speech link that will trigger the text-to-speech generation for that individual item
Inline support

Partially closes #460. A separate PR is coming to add WP-CLI support

How to test the Change

  1. With this branch checked out, enable the Text to Speech feature for a specific post type
  2. Go to that post types edit screen
  3. Select one or more items and then choose the Text to speech option in the Bulk actions dropdown and then hit Apply
  4. Ensure a success message shows and that the generation of audio files worked as expected
  5. Hover over a single item and click on the Text to speech link
  6. Ensure a success message shows and that the generation of the audio file worked
  7. There was some refactoring on our bulk action handling to make it more generic so if desired, test bulk classification features with Watson and OpenAI Embeddings

Changelog Entry

Added - Ability to trigger text-to-speech generation in bulk
Added - Ability to trigger text-to-speech generation on an individual item from the post lists screen

Credits

Props @dkotter

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dkotter dkotter added this to the 2.2.1 milestone Jun 2, 2023
@dkotter dkotter requested a review from a team as a code owner June 2, 2023 16:54
@dkotter dkotter self-assigned this Jun 2, 2023
@dkotter dkotter requested a review from jeffpaul as a code owner June 2, 2023 16:54
@jeffpaul jeffpaul requested review from a team and removed request for a team June 2, 2023 17:05
Copy link
Contributor

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkotter I notice the following issue:

  1. Text to speech option displays in the bulk actions list even if it is not enabled to post type:
    image
    image

@dkotter dkotter requested a review from ravinderk June 6, 2023 21:26
@dkotter
Copy link
Collaborator Author

dkotter commented Jun 6, 2023

@dkotter I notice the following issue:

  1. Text to speech option displays in the bulk actions list even if it is not enabled to post type:

@ravinderk This should be fixed now, thanks for catching this! Was a conflict between the NLU settings and the Text to Speech settings

Copy link
Contributor

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkotter Work fine.

@dkotter dkotter merged commit 529daa6 into develop Jun 7, 2023
13 checks passed
@dkotter dkotter deleted the feature/460 branch June 7, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add WP-CLI command and bulk actions handling to generate audio from text
2 participants