Add voice parameter - Drupal 8/9

Created on 31 October 2022, over 1 year ago
Updated 3 November 2023, 8 months ago

Problem/Motivation

Readspeaker for Drupal 8/9 only comes in one voice. We can change voices by just adding voice param to url.

Proposed resolution

Add voice parameter to url. I created a patch to add the feature.

Remaining tasks

Finalize the approach and fix it.

Consider adding help text below field?

Add?

* Only relevant in case your account has more than one voice per language

Add example for correct syntax?

Enter the voice name in the format pl_jacek

User interface changes

User can configure different voices.

API changes

A new voice parameter is added to the url.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇹Italy marco.aresu Cagliari

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • 🇩🇪Germany sunlix Wesel

    I am uncertain if the textfield is a good UI element.
    Due to the fact, that the site builder has to know such details about the functionality things can go wrong here.
    Is there any helpful documentation on the ReadSpeaker docs how the voice-parameter work?
    It could be hard or impossible to get a nice UI here which leads the user in the correct way for setting up language and voice pairs.

  • 🇩🇰Denmark ressa Copenhagen

    I agree @sunlix, the user needs to know what to enter in the field, from which voices are available for the individual language. Should the field be hidden under an "Advanced" fieldset?

    I don't have a ReadSpeaker account, so I can't check, but I guess most or all of the voices are language-specific. Here are the voices used on the example page https://www.readspeaker.com/languages-voices/:

    • voice=Adam
    • voice=Adina
    • voice=Akira
    • voice=Aleksei
    • voice=Alice
    • voice=Alyssa
    • voice=Amir
    • voice=Ania
    • voice=Annisa
    • voice=Anwen
    • voice=Attila
    • voice=Banele
    • voice=Bayu
    • voice=Benoit
    • voice=Carlos
    • voice=Carmela
    • voice=Carmit
    • voice=Carolina
    • voice=Chloe
    • voice=Diya
    • voice=Elina
    • voice=Empar
    • voice=es_us_penelope
    • voice=Female1
    • voice=Gina
    • voice=Guus
    • voice=Heather
    • voice=Hui
    • voice=Hyeryun
    • voice=Ilse
    • voice=is_karl
    • voice=Jack
    • voice=Jakub
    • voice=Jihun
    • voice=Jordi
    • voice=Kaho
    • voice=Kamohelo
    • voice=Katka
    • voice=Kayan
    • voice=Kinga
    • voice=Lana
    • voice=Lena
    • voice=Lene
    • voice=Lesya
    • voice=Lethabo
    • voice=Liang
    • voice=Lindiwe
    • voice=Linze
    • voice=Luc
    • voice=Lykke
    • voice=Maja
    • voice=Male1
    • voice=Manuel
    • voice=Mark
    • voice=Max
    • voice=Melina
    • voice=Mia
    • voice=Miren
    • voice=Nicolas
    • voice=Oskars
    • voice=Ozan
    • voice=Pilar
    • voice=pl_jacek
    • voice=Priya
    • voice=pt_br_ricardo
    • voice=pt_br_vitoria
    • voice=Rabelani
    • voice=Roberto
    • voice=Roxane
    • voice=Sasekani
    • voice=Sayaka
    • voice=Seda
    • voice=Sifiso
    • voice=Simona
    • voice=Somsi
    • voice=Sophie
    • voice=Sven
    • voice=Teodor
    • voice=Tiago
    • voice=Veerle
    • voice=Vera
    • voice=Violeta
    • voice=Vuyo
    • voice=Yafang
    • voice=Yasmin
    • voice=Zoleka
  • Status changed to Postponed: needs info over 1 year ago
  • 🇩🇰Denmark ressa Copenhagen

    I have written to ReadSpeaker support, asking if they can help clarify this, and will post their answer here.

  • 🇩🇪Germany sunlix Wesel

    Thanks @ressa for your support.
    A mapping table with the supported languages per voice would help to clarify the usage and design the UX properly.

  • 🇩🇰Denmark ressa Copenhagen

    ReadSpeaker Support has answered me, that there is no fixed list of voices as they develop new voices all the time and also support new languages, so such a list would be inaccurate very quickly. The customer can find the available voices in their customer portal. If no voice is defined in the call, the service will pick one from the available voices that matches the language defined in the href.

    So maybe this could be considered for Voice settings?

    1. Place it under a collapsed "Advanced" fieldset
    2. Append extra text Find available voices under Customer Portal > "Voices" to the help text, updating it to this:
      '#description' => $this->t('Enter male or female language voice name. English language examples: Alice or Hugh. Only relevant in case your account has more than one voice per language. Find available voices under Customer Portal > "Voices"'),
      

      Line in MR: https://git.drupalcode.org/project/open_readspeaker/-/merge_requests/12/...

    Image sent from RS support:

  • Status changed to Active over 1 year ago
  • 🇩🇰Denmark ressa Copenhagen
  • @sunlix opened merge request.
    • sunlix committed d991b47b on 2.x
      Issue #3318297 by marco.aresu, sunlix, ressa: Add voice parameter -...
  • Status changed to Fixed 8 months ago
  • 🇩🇪Germany sunlix Wesel

    Merged at first. Please caution: For v2 I consider a rework of all config keys to make maintenance easier.

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @marco.aresu and @sunlix!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024