How to detect end of speaking?

0 favourites
  • 6 posts
From the Asset Store
Safaryx
$5 USD
The game ends when the player loses all their lives
  • I want to fade volume my background music while speaking.

    I have two functions for duck and unduck music.

    First function is pasted right before speaking.

    Second function is pasted right after speaking.

    Unfortunatelly both functions start at the same time.

    How can I detect if speaking is over?

    Or maybe there is a way to detect whether speech synthesis is running?

  • I dug the Construct like a wild pig and I didn't find a solution of my problem ;-)

    It seems that there is no such possibility.

    Is the only solution using a plugin with an external library?

    construct.net/en/make-games/addons/1/javascript/documentation

    github.com/sdkcarlos/artyom.js

    I tested Artyom some time ago.

    There is the possibility of defining the functions at the start and at the end of the speech synthesis.

    It would be great to be able to detect although there is no activity in speech synthesis in Construct 3. Then you could arrange the condition to start the task after you finish speaking.

  • With speaking you mean someone talking via microphone?

    Because then you can use the audio analyser to see if there is sound. You will also probably have to add some threshhold because there will be background noise that you don´t want to detect. Check out the analyser example.

    So if the analyser has a value above X (X beeing the threshhold) then someone is speaking... or rather then there is some sound coming. It doesn´t really detect speech.

  • Thanks a lot WackyToaster!

    And I'm sorry, but I probably did not say enough.

    I meant SpeechSynthesis.

    By the way, your patent with analyser would probably work, clever!

    For me it would not work, because you hear a lot of sounds:

    - background music

    - sometimes footsteps

    - additional sounds sometimes

    - speech synthesis every now and then

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • From documentation, you should have a Is speaking condition. You also have a On speech ended action.

  • I guess I had to be blind to not notice it!

    But the fact is that I'm learning this software.

    Thanks so much for the hint!

    I just created my function and muting of music during speech works just beautiful :-)

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)