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

Feat: Added speed control option for Text-to-Speech module #1317

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

heropj
Copy link
Contributor

@heropj heropj commented Jan 1, 2025

fix #1299

  • Made a function to change rate of speech based on user's choice.
  • User can select speed of their choice from the ui.
  • When a user changes speed, the speech is stopped and 'restarted' with new speed.

image

@heropj heropj force-pushed the feat/speed-control-for-tts branch from 06e0d55 to 6688ec8 Compare January 1, 2025 22:56
Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

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

@heropj Thank you again very much for this PR. To me it works fine, but could you please save in the preferences (beside the chosen voice) the speed, so the user does not have always to change back the TTS speed to his prefered speed?

@@ -54,6 +58,16 @@ void TextToSpeechBar::setLocale(const QLocale& locale)
}
}

void TextToSpeechBar::setupSpeedOptionsComboBox()
{
ui->speedLabel->setText(gt("speed"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you forgot to include the change to resources/i18n/en.json. Please also don't forget to update resources/i18n/qqq.json too.

ui->speedComboBox->setMaxVisibleItems(10);
ui->speedComboBox->setLineEdit(new ComboBoxLineEdit(ui->speedComboBox));

QStringList speedOptions = {"0.25x","0.50x","0.75x","1.00x","1.25x","1.50x","1.75x","2.00x"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we include x in the speed rate value? Won't internationalization be slightly affected? In youtube there is no x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍👍i'll remove it.

@heropj
Copy link
Contributor Author

heropj commented Jan 5, 2025

hello @kelson42 , @veloman-yunkan
There are shortcuts to select language and voice...
eg CREATE_ACTION_SHORTCUT(ToggleTTSLanguageAction, gt("select-read-language"), QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_L)); to select language

do we need a shortcut for choosing speed also?? if yes then what should be the key-combination..
ALT+SHIFT+S is already selected as shortcut for "reading selected"

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 option to speed-up Text To Speech
3 participants