Skip to content

voice-player autoplay don't speach when textChange #8

@jmorille

Description

@jmorille

Bug 1 : The event textChanged should play the new text in autoplay=true mode.
The solution is something like that (int voice-player)

 textChanged: function() {
                this.speech.text = this.text;
                if (this.autoplay) {
                    this.speak();
                }
            },

Bug 2 : In autoplay=false, is not possible to call speach function with the current text
Each time it play the old one, because the event textChanged, arrive after the speachTextChanged
like this sample

  <template>
     <core-input inputValue="{{searchText}}"></core-input>
    <paper-icon-button icon="search" on-tap="{{speachButtonHanlder}}"></paper-icon-button>
     <voice-player id="search_notif_vocal" text="{{speachText}}" accent="en-US" autoplay="true"></voice-player>
  </template>
  <script>
       ...
            speachButtonHanlder : function (e) {
               this.$.search_notif_vocal.setAttribute("text", this. speachText);
                this.$.search_notif_vocal.speak();
            },
       ...
  </script>

This code play all the time the old Text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions