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

TTS voice directions over bluetooth are cut off at end #15222

Open
gzuaps opened this issue Sep 4, 2022 · 10 comments
Open

TTS voice directions over bluetooth are cut off at end #15222

gzuaps opened this issue Sep 4, 2022 · 10 comments
Labels
Observed Needs more clarification, feedback, or research

Comments

@gzuaps
Copy link

gzuaps commented Sep 4, 2022

Description

TTS voice directions over bluetooth are cut off at end
voice directions generally don't complete/finish, only way to have them complete is to play music
at the same time.
Seems to be phone dependent, I've experienced the problem on my last 2 phones,
moto e6 plus
moto e7
I've seen one other report by another user in the OSMand forums.

How to reproduce?

navigation with bluetooth on, no music playing

Your Environment

OsmAnd Version: 4.2.7
Android/iOS version: 9 and 10
Device model: moto e6 plus and moto e7

Maps used (online or offline):
If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date.
offline maps

@sonora
Copy link
Member

sonora commented Sep 4, 2022

Any more details? Like

  • How much is cut off, seconds, milliseconds? Always entire words or also syllables?
  • Are all commands affected equally?
  • Do things work ok over the device speaker?
  • Does it depend on the OsmAnd sound output channel selected?
  • Have you reset the Android TTS settings to default?
  • Have you tried another (third party) TTS engine?
  • Can yoy povide a recording?

You may use the test voice prompts functionality of the Development plugin for testing.

@vshcherb vshcherb added the Observed Needs more clarification, feedback, or research label Sep 6, 2022
@gzuaps
Copy link
Author

gzuaps commented Sep 9, 2022

Hi

thanks for getting back to me, response below

*How much is cut off, seconds, milliseconds? Always entire words or also syllables?
can be enough time to for entire words like "street" or "avenue", can also be very short.

*Are all commands affected equally?
Not always by the same amount of time. But most commands are cut off to some extent.

*Do things work ok over the device speaker?
Yes device speaker is OK, I suspect this is bluetooth only.

*Does it depend on the OsmAnd sound output channel selected?
Yes, if output channel is phone seems to be OK, occasionally a voice prompt will be silent.

*Have you reset the Android TTS settings to default?
Yes.

*Have you tried another (third party) TTS engine?
Tried RHvoice, same problem with bluetooth

*Can yoy povide a recording?
https://drive.google.com/file/d/13JBt3s0DKfqmU6EkIWYDw35bphsCjTXT/view?usp=sharing

Thanks.

@sonora
Copy link
Member

sonora commented Sep 9, 2022

That's rather weird, I've been researching this and find no precedence anywhere, it seems like a rather specific hardware issue.

Can you please try this:
(1) Select your navigation app profile, go to 'Configure profile / Navigation settings /Voice prompts / Voice guidance output'.
(2) For all 3 options there, go to Development plugin settings / Test voice prompts, and use button 11.2 to toggle through the different delay times to see if these make a difference (in particular test delay=0ms).

These delay times actually serve the purpose of avoiding cutoffs at the beginning of the promots, while the bluetooth connection may still be established.

I have no idea why the prompts could be cut off in the end... Do you have another BT speaker you could test for comparison?

@sonora
Copy link
Member

sonora commented Sep 9, 2022

Addendum regarding the 2 recordings you provided, I have roughly timed them:

Button 3.7:

  • Original length: 3.2 seconds
  • Cutoff length: 3.0 seconds

Button 3.6:

  • Original length: 2.6 seconds
  • Cutoff length: 2.0 seconds

It may just be a coincidence, but it could be that your BT setup has a bug and only keeps the connection open for full seconds, i.e. cutting off any remaining fractional seconds a prompt may take. (If you provide a few more recordings we can check.) Such a BT device's strategy may be ok for playing music, but hurts here ;)

@gzuaps
Copy link
Author

gzuaps commented Sep 10, 2022

Quick response to some questions.
I've tested with a bluetooth enabled amplifier, and there are no problems with this device.
I don't think the problem is just with the car bluetooth device as it worked OK with an older phone, it is only
the 2 motorola phones that have the problem.
I dug out the older phone, a Huawei Y560 updated OSMand+ and tested, there were no problems.

I re-tested the moto e6 plus with the delay=0ms, still getting the cutoff at the end.

Below is the link to the other user with the same issue.
#13202

@sonora
Copy link
Member

sonora commented Sep 10, 2022

Weird... I assume the 'Pause music' setting in the Voice prompt settings does not make a difference either?

I would say it's a driver issue. Could test if other apps exhibit the same issue, e.g. this one https://play.google.com/store/apps/details?id=com.artemnikitin.tts

This app may provide a workaround https://play.google.com/store/apps/details?id=dev.danjackson.speaker but would probably lead to the BT connection being kept active between announcements, which may not be desired.

In theory we could add a second of silence to the end of all voice prompts, which may or may not fix this, but it would be a strange mitigation for such a spurious flaw.

@gzuaps
Copy link
Author

gzuaps commented Sep 13, 2022

If music is playing and "Pause Music" is enabled then I get the cutoffs, otherwise OK.

The TTS test app gives cutoffs similar to OSMand+, the string
"continue for 4 kilometres to Stirling avenue" cuts off "avenue" same as OSMand.

The silence playing app workaround may help but will use battery.

I'm surpised there are not more users reporting this, I don't expect any mitigations just for my case alone.

Thanks.

@sonora
Copy link
Member

sonora commented Sep 13, 2022

I think it's worth opening a ticket with Motorola, it currently seems that only their hardware or firmwares are affected, and it seems it is not really an OsmAnd flaw if also the TTS Test app exhibits the same behavior.

Could be a driver issue. As I said, from the 2 recordings you provided I suspect they may keep the bluetooth channel open only for full seconds, thus truncating any additional fractional second which would be needed to play any rest. Probably no big deal for playing Music or ringtones, but it is for voice prompts, of course. (Maybe you can use the TTS test app to see if you can produce prompts which will play in full, if they happen to take an integer number of seconds.)

@macro182
Copy link

macro182 commented Sep 15, 2022

Hello,
same issue on Huawei P20 lite (last version of Osmand+ and previous).

This happens every time I use Osmand+. At a certain point it stops working. It's not just that the audio is cut, but it totally stop giving the vocal guidance (even though I can hear that the BT connection happens).
Tried plenty of times to change audio output, pause music/do not pause music, etc... the only solution is to reboot the cellphone.
Other apps keep working instead (e.g. Spotify, CamSam).

It's really frustrating and I look forward to any hint that might resolve it.

Thank you!

@sonora
Copy link
Member

sonora commented Sep 15, 2022

@macro182 If the audio is not cut off by a fraction of a second in the end, but instead stops working entirely, please open a separate issue about this, as it requires a completely different procedure of debugging, and one can expect this to have a rather different root cause. Please mention if this only happens via BT, what happens if you switch back to the device-internal speaker, if force-closing and restarting the OsmAnd app fixes it again, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Observed Needs more clarification, feedback, or research
Projects
None yet
Development

No branches or pull requests

4 participants