Commit graph

93 commits

Author SHA1 Message Date
Solomon Peachy
3ac252b840 FS#13614: Add Moldavian (ro_MD) language (Mihai Alexandru Vasiliu)
TTS is set up to use ro_RO, but is not enabled yet.

Change-Id: Id71e1453e58b03e0a4205f459de87a79ff11a10e
2025-05-02 16:51:23 -04:00
Solomon Peachy
12b9419006 Some fixes for language and voice scripts:
Languages:
  * Get rid of leading space on LANG_ID3_VBR [ " (VBR)" ]
  * Fix up sole user to insert the space programmically
 updatelang:
  * strip leading and trailing spaces on all phrases except VOICE_PAUSE
 voice.pl
  * Debug logging with UTF-8 output
  * Explicitly delete tab character from voiced strings

Change-Id: Ie466793479ce15ce7a9553770583a070530e7afd
2025-04-29 20:03:11 -04:00
Solomon Peachy
e72c42df20 voice: Add the bits needed to voice Ukrainian, and enable it by default
Change-Id: I002fd5022539db6f8e4270c24e0112e151f7e516
2025-04-29 14:33:35 -04:00
Solomon Peachy
310e380056 voice: Add the bits necessary to generate Romanian voices.
Due to the coverage being below 85%, disabled for nightlies

Change-Id: I90641f472e5a5cbca147986501236bd1b2ca8a5b
2025-04-25 20:47:27 -04:00
Solomon Peachy
fc9076e89f voice: Add support for voicing Brazilian Portuguese. Disabled by default.
Change-Id: Iaef5e59e3dd6037c0fa3ffed1c00a0f7cde411b2
2025-03-24 08:45:11 -04:00
Solomon Peachy
21941a8165 voice: Add support for voicing Latvian. Disabled by default.
Change-Id: Ieeec14bf259518232fb158a87abab7d4e58362c8
2025-03-23 21:03:36 -04:00
Solomon Peachy
14ba18b1dd builds: Add Japanese to the nightly voice set (using gtts)
Change-Id: I77fb5601d45c008f72b613f8e67148ccca738b71
2025-02-01 13:34:01 -05:00
Solomon Peachy
36e85ef78a voice: Correct a rather embarrasing bug in talk clip generation
Introduced

Change-Id: I150617267b8866a7ae09bf9c01430e7afbd369ed
2025-01-23 15:52:02 -05:00
Solomon Peachy
a220402d51 voice: clean up a debug message
Change-Id: Iee8c68a8e943218ce53b46a7150af7df08702719
2025-01-22 13:22:25 -05:00
Solomon Peachy
5e8d3fec66 voice: Silence a runtime warning when generating talkclips
Change-Id: I9d95377654d8883315657a1eff11ff198df9a41b
2025-01-17 11:36:36 -05:00
Solomon Peachy
505bbcaff5 voice: Correct piper voice name for es_MX
Change-Id: I39c78e5067c049b8b269138d7d26273a141deae2
2024-11-21 07:43:09 -05:00
Solomon Peachy
9b725a9fad voice: Add Spanish (Mexican) to the nightly voice sets.
This uses the piper engine.

Peninsular Spanish sounds markedly different from Central/South American
Spanish, so it seems prudent to offer both.

...We'll see how the masses feel.

Change-Id: Idfd3edd92c2dde7f9288afd99f474e59984689c9
2024-11-20 20:46:09 -05:00
Solomon Peachy
9420650c87 voice: Normalize all voiced strings NFC form before passing them to TTS engine
This should be a no-op for .lang files, but it can matter when
generating talk clips, as those are based on the raw filename.

Change-Id: Ia449ae7668818e4bf093347fd0fb15fa5b67fa69
2024-10-13 09:33:39 -04:00
Solomon Peachy
1694101b23 voice: Also apply voice corrections to talkclips
Change-Id: I8846610933dd286d39f930f004787d9a5345a9ce
2024-10-12 16:41:46 -04:00
Solomon Peachy
566d99aced voice: Switch default English Piper voice to 'en_GB-semaine-medium'
The former one ('cori') had some very pathological corner cases
especiallly when voicing single letters. This one is just
better all around.

Change-Id: I275256a637cf70ba196aafdecc24038bfe841955
2024-07-27 07:47:12 -04:00
Solomon Peachy
2dddf16e2c voice: Shorten silence threshold to 250ms (from 500ms)
Change-Id: I32ef8691f9e0adad1af4fce3c167cfcd950ca120
2024-07-26 21:03:29 -04:00
Solomon Peachy
334def8431 configure: Fix android x86 build
Change-Id: Iea1d92bcf83f016e724496ebf037c8402ede170c
2024-07-24 09:01:04 -04:00
Solomon Peachy
6dd9b9786c voice: Fix typo in Bulgarian gtts default cmdline
Change-Id: I56b285aa1ba89f645702b514339d60e3679fc98c
2024-07-23 13:55:37 -04:00
Solomon Peachy
a153f6c266 voice: Add defaults for Bulgarian voicing, and add it to the nightly builds.
Change-Id: I40e9eaf34c68c3e1f77591862f5c4eb6c2a2c059
2024-07-23 12:15:27 -04:00
Solomon Peachy
c72030f98c voice: Add default voice entries for Korean for gtts and espeak
(Piper does not have a Korean voice set yet)

Change-Id: I6675aed6f7b1f376cd80bcb447ceae8e6bedac36
2024-07-22 20:34:40 -04:00
Solomon Peachy
a7159ad483 voice: Encode all tts options in the POOL filename.
It was only including about half.  Unfortunately this will likely
invalidate all existing pools.

Change-Id: Ib1da430259823a5429b4119067ba9ef0c16b7900
2024-07-18 10:30:34 -04:00
Solomon Peachy
16094fca33 voice: Minor tweaks for Chineese TTS
Change-Id: I717a40cd00e9deabf093aabd05bc2608488c5f56
2024-07-18 10:30:34 -04:00
Solomon Peachy
8ddd94f3fd voice: Add default mappings for Chinese-Simplified TTS
Change-Id: I89aaedf4843a4323af0f2a734e05ccd87b9b2530
2024-07-18 10:03:20 -04:00
Solomon Peachy
8f75b29aed voice.pl: Fix an issue with the piper tts engine
It only arose with the dailybuild scripts.

Change-Id: Iefb0fbab39846df6e52b3860f3d74e6dc9c39305
2024-06-23 19:41:53 -04:00
Solomon Peachy
d117debca9 voice: Don't touch the voice pool file when we reference it.
...With over 14,000 pool files, it's silly.

Change-Id: Ib615e0813caef0506bed4e53099578dc8e74cacc
2024-06-23 14:06:46 -04:00
Solomon Peachy
bb12746972 voice: Make sure we always copy INVALID_VOICE and LANG_NAME clips
If they were in the pool, they'd not be copied out.

Change-Id: If3d7d72656eba18e2df7f7f1307f967494cb4ab6
2024-06-21 16:58:43 -04:00
Solomon Peachy
80cd799925 voice: If $POOL is not set, use <build-dir>/voice-pool by default
It will _vastly_ speed up repeated voice builds.

The voice pool directory will not be erased by a 'make clean'

Change-Id: Ice58d5c5355abfa5a385dfca749f8063e2ee8622
2024-06-20 21:00:48 -04:00
Solomon Peachy
e100daf343 voice: Voiced strings for INVALID_VOICE and LANGUAGE_NAME
* Voice generation script will create standalone .talk clips
 * These talk clips will be included in the rockbox .zip file
 * All .voice files will be included in the rockbox .zip file
 * Added LANGUAGE_NAME for all languages in the nightly builds

This way, any voice pack installed will give you a the langauge
voiced in the browser, and if the voice file fails to load you
will get a natively translated error message.

Change-Id: I6b627a51746cd088d6e200666dd326ea2745f55f
2024-06-20 17:31:31 -04:00
Solomon Peachy
b9e6e67962 voice: Switch default piper voice for Italian
Change-Id: I9c234e258e0c32f7232851e7e431083b287f73dd
2024-06-07 12:21:54 -04:00
Solomon Peachy
27cb1abcec builds: Add disabled voice builds for Spanish, Estonian, and Czech
Including default voice selections

Note that piper does not have an Estonian voice option yet.

Change-Id: Ie3b9edcae222e70790eb01d38a13e2e69df8e7df
2024-05-18 10:45:36 -04:00
Solomon Peachy
0bfc5d8d99 voice: Switch default piper voice for english-us
The original one was picked at random; while I personally find it
pleasing, it's soft spoken and doesn't work well when voicing over
already-playing music.

Change-Id: I0ed033f02a54f42e2d0729cab883068ecaad6faa
2024-05-13 12:02:17 -04:00
Solomon Peachy
6bb6c20479 voice: Don't generate talkclips for directories with 'talkclip.ignore'
Add one of these to the .rockbox directory

Change-Id: Ibc9733ba31d1b2c49b69ab833d284faa84f5cedd
2024-05-07 16:21:21 -04:00
Solomon Peachy
64e4f81ffc voice: Properly handle UTF8-encoded filenames when generating talkclips
Eg this was happening before:

  '11 - Breña.mp3' --> '11 - Breña.mp3'

As well as resulting in incorrect voicing, it was breaking the encoding
of the .wav to .talk.

Change-Id: I6cf844d843ddf1a459f92e1ebd55c9feec886f55
2024-05-07 16:21:21 -04:00
Solomon Peachy
e8a51569ad voice: Add support for the Piper TTS engine
https://github.com/rhasspy/piper

High quality, offline, neural-network-based, with good language coverage

Note that you have to manually download the piper voice models, and set
PIPER_MODEL_DIR appropriately.  The configure script will let you choose
from the available models and remember your choices.

Change-Id: I8eba9fcf78b51b01b89491539aac3e423cc42f16
2024-04-21 18:08:47 -04:00
Solomon Peachy
06cf2f0da5 voice: touch re-used voice pool files so we know they're used.
Change-Id: I13779845884f770aabb921543a9fa589fc89294e
2024-04-21 18:07:23 -04:00
Solomon Peachy
c38aeb3fbc voice: add a 'make talkclips' target for voice builds.
This will use the configured tts engine and language to generate
the talk clips for a specified directory.

  TALKDIR=/path/to/somehere make talkclips
  TALKDIR=/path/to/somehere make talkclips-force

If 'TALKDIR' is not defined then it will error out gracefully.

Normally if a talkclip is present already it will not regenerate the file,
but 'make talkclip-force' will regenerate it anyway.

Change-Id: I62683f9e5ca395fd303ac6029096c20da1e96d01
2024-04-17 14:55:17 -04:00
Solomon Peachy
ebd952da2f voice: minor refactoring in the voice gen script
Change-Id: If0082ca2cb89e36fd5a1c4664cad0c594501db31
2024-04-17 11:21:32 -04:00
Solomon Peachy
613a1432d6 voice: Improvements to the talk clip generation
This covers the voiced directory and filenames

 * Don't regenerate a talk clip if one is present (?)
 * Format awareness; ie if the TTS engine generates an mp3 file,
   convert it to a wav file so we can encode it properly
 * Use a global variable for the wavtrim threshold

Change-Id: I9f441b573704bdf7675794fd0e1984446308463b
2024-04-17 09:02:20 -04:00
Solomon Peachy
c8dd31aab7 voice: Fix the 'gtts' voice generation backend.
* Language and dialect need to be specified separately
 * Convert the mp3 files generated by gtts into wav into rbspeex
   (Uses ffmpeg currently)

Change-Id: I6d7b9494e70a61537519221522202ea28469cc70
2024-04-16 18:37:43 -04:00
Solomon Peachy
3cc7509e81 voice: Add default presets for Danish.
(The language remains <75% translated)

Change-Id: I7c9b7627e745aafc60a3d8965e7aceaa63c7664c
2021-09-28 17:25:28 -04:00
Solomon Peachy
f7005eb4e4 voice: Generate Dutch voice file now that the translation is complete
Change-Id: Ic5fd45002e94f99d4557fca9ffa75df7fa6f20d8
2020-12-12 13:43:13 -05:00
Solomon Peachy
2305966d84 updatelang: New tool to update language files.
Change-Id: I3c18bb34770b4b4b321199149a2ea693dfbdb7f4
2020-07-27 14:58:38 -04:00
Solomon Peachy
1748b475a9 voice: Allow use of an existing (textual) voiceids file
If it's present, we don't need to generate one, which means we don't
need to know the target name and features list.

The next step is to accept the binary variant that rbutil uses
so we can generate a complete voice file on the cmdline.

Change-Id: I1a355f985e6af46b11610de781996000110ae9de
2020-07-19 01:34:42 -04:00
Solomon Peachy
980124ec73 voice: Ensure there are no missing strings when generating the voicelist.
If the translation is not 100% complete, we need to make sure anything
missing is copied from English so there won't be any gaps in the voice
files.

(This behavior is similar to what we do for the regular binary lang files)

Change-Id: I5fd2a50d08317eb8445926145a74a38033e0ebcc
2020-07-12 17:03:19 -04:00
Solomon Peachy
aa20b6af7a voice: Two more fixes.
Change-Id: I5aaf10c588f4396e61942b8fcd6c62c792ea175b
2020-07-11 18:28:54 +00:00
Solomon Peachy
b546d9d172 voice: More fixes, and add more languages
* Pass strings via stdin where possible
 * Add German, Italian, and Norweigan to the build list.
   (in other words, everything with >=95% coverage)

Change-Id: I0154b178b15ddd0b79566c1cb62f76ade32824aa
2020-07-11 17:22:06 +00:00
Solomon Peachy
aad57ea1cc voice: Further enhancements for multi-lingual voice generation
* configure: allow use of full tts engine names when making selection
 * voice.pl:  fixes for espeak-ng
 * build.pm:  Add a list of "standard" voices for tooling use

The latter will be used by the nightly builder infrastructure to
determine what voices to generate.

Change-Id: Iff55288f94a30fbe08d8345b730969b7264b5e0f
2020-07-11 15:01:33 +00:00
Solomon Peachy
185d2bbb6a voice: More voice generation fixes:
* espeak vs espeak-ng  (prefer the latter!)
 * voicepool was busted for most non-english strings

Change-Id: Iae6df0f5426155b7b1f444160814ff9ef4581f21
2020-07-11 01:33:04 +00:00
Solomon Peachy
938d820355 voices: Add tts language mappings for the top 19 languages
festival: english and spanish only
gtts:  all but nederlands
espeak: all (need espeak-ng for czech, greek, and japanese)

Change-Id: I7df1b3235b48f352b0af3c13e3742e85432bc692
2020-07-11 00:09:49 +00:00
Solomon Peachy
711bff47b7 voice: Enhance 'espeak' to automatically pick the language + voice
Most of the 'perfect' or 'good' translations are covered.

Also, don't override user-specified voice

Change-Id: I837bd67e9df2b8bcc7e020f12a2f411c9175565b
2020-07-10 23:28:25 +00:00