See the update in the first post. I think this is what you need.
there’s something wrong with sound jamming… at first, the volume really goes down, but then there is a pause…
as a result, any player goes on pause : (
this may be due to the fact that the voice is played in the alarm channel and the system automatically podruzamevaetsya that everything that plays should pause… I have no other suggestions.
the idea is amazing. this is a very necessary extension for today, but unfortunately it does not work properly yet. I really believe and expect that everything will work out.
It’s strange. It works fine on my phone: the sound is muffled and plays in parallel with the voice, like a background sound. After, the sound volume is restored to the previous level. Apparently it works differently on different phones.
[quote=“ScorpioNormal, post:1, topic:21306”]
Update in V2 :
Fully modified extension.
Added the ability to adjust the volume of the speech . In addition, the volume can be changed using attributes inserted in the text to speech /vol=0.8/ . Due to the fact that speech is now playing in the Alarm sound stream, has become possible to speak without stopping the background music , but only reduce it. This feature is useful, for example, when creating a “smart speaker”.
Congratulations, great additions to the extension.
There is a problem. With headphones connected, speech sounds both in the speaker and in the headphones. I assume that this is because the voice sounds in the Alarm channel. How do I make it sound only in headphones? Perhaps you should use a different channel ? You can help. Waiting for an answer. Thank you in advance.
This is correct, I did not think about headphones. I will have to try using a different channel.
That would be very nice.
Unfortunately, TTS can only work in MUSIC, ALARM, and RING streams. In the remaining streams, voices are not heard. ALARM and RING work the same way - if wireless headphones are connected, the voice continues to be audible through the speaker of the phone. It remains to use only wired headphones))
in wired headphones, the same thing.and yet you can make it so that you can choose which channel to send your voice to?
Yes, can make an additional property for selecting a channel. But, it will be possible to choose between MUSIC, ALARM, and RING, which will not solve the problem.