<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tangara-fw/src/tangara/tts/player.cpp, branch main</title>
<subtitle>Tangara firmware</subtitle>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/'/>
<entry>
<title>Gate playback on the existence of /.tangara-tts/.</title>
<updated>2025-02-18T12:41:46+00:00</updated>
<author>
<name>Tursiae</name>
<email>git@tursiae.org</email>
</author>
<published>2025-02-18T12:39:48+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=eba8825d9f4df93e3f89010a4349c72046faa16a'/>
<id>eba8825d9f4df93e3f89010a4349c72046faa16a</id>
<content type='text'>
Also, clang-format previous changes in provider.hpp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, clang-format previous changes in provider.hpp.
</pre>
</div>
</content>
</entry>
<entry>
<title>TTS: Avoid exhausting the WorkerPool with concurrent TTS playback.</title>
<updated>2025-02-10T23:42:43+00:00</updated>
<author>
<name>Tursiae</name>
<email>git@tursiae.org</email>
</author>
<published>2025-02-09T07:25:16+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=fe7c26d27d47f6087b67af9fe740f674078b5da1'/>
<id>fe7c26d27d47f6087b67af9fe740f674078b5da1</id>
<content type='text'>
Reported in issue #258.

As of v1.2.0, if /.tangara-tts/ samples are present on the SD card, and
&gt;= 4 menu items with matching TTS samples are highlighted in the UI, and
no audio output (headphones or BT sink) is connected, the `tts::Player`'s
invocation of lambdas on the WorkerPool will result in worker task
exhaustion.

This is because we get stuck in state where the `drivers::PcmBuffer` is
not accepting any new samples, and the inner loop in `Player::decodeToSink`
that pushes to the output isn't checking to see whether playback was
cancelled. So the loop never terminates, and we consume that worker slot.

Repeat with another 3 menu items, and, hey, all four worker threads are
consumed with TTS that will not terminate until headphones/BT are connected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported in issue #258.

As of v1.2.0, if /.tangara-tts/ samples are present on the SD card, and
&gt;= 4 menu items with matching TTS samples are highlighted in the UI, and
no audio output (headphones or BT sink) is connected, the `tts::Player`'s
invocation of lambdas on the WorkerPool will result in worker task
exhaustion.

This is because we get stuck in state where the `drivers::PcmBuffer` is
not accepting any new samples, and the inner loop in `Player::decodeToSink`
that pushes to the output isn't checking to see whether playback was
cancelled. So the loop never terminates, and we consume that worker slot.

Repeat with another 3 menu items, and, hey, all four worker threads are
consumed with TTS that will not terminate until headphones/BT are connected.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up some tts logging and descriptions</title>
<updated>2024-09-12T01:44:20+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-12T01:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=d8b9e65e68214b4aa2bb24ddae3602d5788bc469'/>
<id>d8b9e65e68214b4aa2bb24ddae3602d5788bc469</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Pause and unpause the current audio output in response to TTS</title>
<updated>2024-09-12T00:44:26+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-12T00:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=c51709f99ff5456a5863ca39ff893f823a3642d4'/>
<id>c51709f99ff5456a5863ca39ff893f823a3642d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Play TTS files in response to TTS prompts, but it's legible now</title>
<updated>2024-09-11T02:57:04+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-11T02:57:04+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=542ebc65317ac4744a4b96c3131dace5bda10314'/>
<id>542ebc65317ac4744a4b96c3131dace5bda10314</id>
<content type='text'>
 - input files are upsamples and padded to stereo before playback
 - any in-progress playback is cancelled before playing a new file
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - input files are upsamples and padded to stereo before playback
 - any in-progress playback is cancelled before playing a new file
</pre>
</div>
</content>
</entry>
<entry>
<title>Play basic wav files in response to tts prompts</title>
<updated>2024-09-09T06:39:22+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-09T06:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=d0b739c66ef11a6c16f99cad6957a1782236fd8c'/>
<id>d0b739c66ef11a6c16f99cad6957a1782236fd8c</id>
<content type='text'>
It's currently quite limited (no stereo or sample rate conversion,
multiple messages clobber each other, only plays if music is playing),
but we're getting there!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's currently quite limited (no stereo or sample rate conversion,
multiple messages clobber each other, only plays if music is playing),
but we're getting there!
</pre>
</div>
</content>
</entry>
<entry>
<title>WIP initial tts player wiring</title>
<updated>2024-07-19T03:59:30+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-07-19T03:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=9475d10d1000c7e21a7ea311b0c8ee6a72ef46c4'/>
<id>9475d10d1000c7e21a7ea311b0c8ee6a72ef46c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
