Commit graph

2516 commits

Author SHA1 Message Date
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
f58c15440f build: 'make clean' should remove generated talk clips too
Change-Id: I06eb5ad4e6af53f6cc8e95f41ff0fcbca14cda37
2024-06-20 18:01:42 -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
8ef20383b1 sims.pl: Skip over 'obsolete' targets
Change-Id: Ieb198a3de84d3d99b6f046ff340bcfac5c19fc7a
2024-06-19 17:29:32 -04:00
Solomon Peachy
637f93074e tools: Clean out some historical cruft from 'sims.pl'
It's intended to build all of the Windows Simulator builds in one fell
swoop but has bitrotten a bit.  Correct some of the glaring
problems.

Change-Id: I6073af629d2698624036ccf303a5d18398cefdc0
2024-06-19 17:26:47 -04:00
Solomon Peachy
2ef10ec734 Fix typo in the previous commit
Change-Id: I9e8de11ba86e147abc9bb5b3dfcc550655fe360d
2024-06-19 09:22:44 -04:00
Solomon Peachy
9beca004b9 simulator: Hopefully fix red introduced in 5b61c79cf
This problem only happened with GCC7 (and older?) simulator builds, and
was introduced by an incorrect test that always stripped our default
optimization (-Os) in simulator builds.

The fix is to correct the test to only strip -Os if the user explicitly
enables a debug build.

Also, use -Og instead of (implicit) -O0, as per GCC recommendations.

Change-Id: I61091b3cdf5323504961c0bb2d80aa65049eb8fb
2024-06-19 08:49:02 -04:00
Roman Artiukhin
5b61c79cf8 simulator: debugging: Disable -Os compiler optimizations when DEBUG is defined
Otherwise, breakpoints may not correspond with the source code

Change-Id: I0f8d4f578bde52c0219923d8be28e01c66c8dfbc
2024-06-18 20:42:59 -04:00
Solomon Peachy
73f40d8a23 build: Experimental LTO support, phase one
* Only codecs and plugins are enabled
 * Only native builds (so far)
 * Only tested on xDuoo X3 (MIPS, monochrome)
 * opus & speex generate some warnings
 * Significant compile time impact

Change-Id: I519b0d179631a54b2103cd67225bd5ec6ad3bd2f
2024-06-18 08:15:47 -04:00
Solomon Peachy
810e337a87 xduoox3: It doesn't have a radio, so don't put that in APPEXTRA
Change-Id: I4521598af49f91ab89d19bb6c2bf8bebf60bad51
2024-06-08 19:03:35 -04:00
Solomon Peachy
92b5255106 lang: Add a few more items to the "ignore if same as English" list
Change-Id: If65476d563b61a195de8554312c8a51e6aa4187d
2024-06-07 12:21:54 -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
d22dbe74cb updatelang: '~' is not a legal character in dest or voice strings
...Unless it's the very first character (and will get stripped).

So detect and complain about this!

Change-Id: I5e333e8ee134160f64a67783b0d5aa564716d44e
2024-05-30 21:02:18 -04:00
Solomon Peachy
8b8c0c7c2a checkwps: Validate translated strings (%Sx)
In verbose mode it will log valid the strings found, otherwise it will
only complain when we encounter a missing string.

Unfortunately a missing string is not inherently a problem, due to
conditional expressions.  So all we can do is complain in checkwps
or if wps debugging is turned on.

Meanwhile, this is the first step in actually enumerating the translated
strings used by themes.

Change-Id: Ia93b333085e825d5b085c4d372ad8e13aa3e3ba1
2024-05-24 21:37: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
8b1efab7a6 voice-corrections: move generic corrections to the END and document why
This is because a language may have a specific correction that should
take precedence over the global one, but if the global one is applied
first, then the language-specific correction gets skipped.

Change-Id: I45f736f20d6c83864df0bf764ca3d75ec4b9626a
2024-05-17 08:23:48 -04:00
Solomon Peachy
6c2f8f640f genlang: Strip _all_ leading '~' from dest/voice strings
(Instead of just the first)

Change-Id: I3c730fd4e570dc5ec77d63777c8499e81f1b0491
2024-05-17 08:07:58 -04:00
Solomon Peachy
1530bb4849 voice-corrections: Correct an error in English and sort languages alphabetically
('ADC' was being converted to 'A C C' for some reason..)

Change-Id: I0157813cad963cbfae3f63b00f0c75df01ec8e0c
2024-05-17 08:06:22 -04:00
Solomon Peachy
c615a02ee3 updatelang: Improve tests for illegal characters
Change-Id: I1a8ed93f1e7d6b449e634656c8ff087f28c259f5
2024-05-16 21:51:14 -04:00
Solomon Peachy
3a6ed727d4 lang: Add a special flag to differentiate "intentionally identical to english"
We normally treat "same as English" as a translation errors that needs to be
corrected.  However, many languages effectively use english words as-is, so
we need a way of distinguishing the "intentionally the same" situations with
our tools "automatically copying missing translated strings from English" to
avoid blank or missing UI strings.

The solution is to make sure these "intentionally same as english"
strings are actually different.  This will be accomplished by prepending
'~' to the these strings.  This special character is stripped from the
binary data files used by the player and the voice generation tools.

Change-Id: I90088cbd74de0e5cb9d65f75f26afe04f7e301bf
2024-05-16 20:40:37 -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
d0758c5330 builds: Add 'erosqnative' to the 'unstable' build list
This will add it to the nightly builds, and add voice etc generation

Change-Id: I8d792775f9db9da23271913e62a170f2a907ed41
2024-05-10 08:34:04 -04:00
Solomon Peachy
6e82897bfc make: Update help text
Change-Id: I069d3f62d93f0e8aab48f2cedbc8c7e65fde94d4
2024-05-08 22:40:18 -04:00
Solomon Peachy
54389dcf2f configure: fix test for LD version on non-macos systems
Change-Id: I6296a013def3e55b44cbba781f3a397a94d2c561
2024-05-08 22:40:18 -04:00
Solomon Peachy
8c86fb6da0 arm: Use -masm-syntax-unified when compiling with gcc8 or newer
Annoyingly, this makes all of the '.S' files we compile get treated as
divided syntax, so we need to make the syntax in them explicit.

Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
2024-05-08 21:45:42 -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
William Wilgus
d7c541742f Allow first level folders in plugin menu
add sorting directories as files
move picross files to a hidden folder

use directory for lua_scripts, sgt_puzzles

make plugin browser able to handle 1st level directories

Change-Id: I30852d71dc992c378d5790756e94f06f5a2e9bef
2024-05-05 14:01:43 -04:00
Solomon Peachy
b32266b7db updatelang: Avoid some runtime warnings
...And add '"' to the suspicious character list

Change-Id: Ia8a790882085a6e82c89cae09164ddbccf36e47f
2024-05-01 09:11:58 -04:00
Solomon Peachy
0c0b1b1a6b updatelang: Sanity-check the translated LANG_VOICED_DATE_FORMAT
This must be *localized* not translated!

Change-Id: I961eac91356a4b3ba7bba9828df69a08ce273543
2024-04-30 21:26:59 -04:00
Solomon Peachy
34c6ee539f updatelang: Include the old/incorrect format specifier in the error message
Change-Id: Ic8ea9430e1412d98b518bcb2d8508ef459d1700a
2024-04-30 06:18:46 -04:00
Solomon Peachy
73a47a1b5e updatelang: Make sure translated string has the correct format
We do this by parsing out the format specifiers and making sure the
translation has the correct number, type, and order of specifiers.
Percent literals ('%%') are ignored.

Mis-matched formats can lead to much badness, so to be safe, use the
untranslated string instead and flag it as a problem on the translation
site.

Change-Id: Ib48c2e5c3502735b1c724dd3621549faa8b602b7
2024-04-29 22:03:12 -04:00
Solomon Peachy
9fd4782c6a updatelang: Complain about suspicious characters in voiced strings.
The main intent is to catch printf() format specifiers (ie '%')

Change-Id: I8ed54993431e5f4d35e98de8faa7690198d5947f
2024-04-29 17:14:15 -04:00
Nathan Korth
2c7e47fc12 New plugin: Picross
Picross is a puzzle game also known as Picture Crossword, Nonograms, or
Paint By Numbers. See http://en.wikipedia.org/wiki/Nonogram for
information on how to play.

Update 1: nicer graphics with less images, fixed directory listing,
changed how the board works to make a lot of math more sane

Update 2: added missing rb.yield to viewPicture loop

Update 3: you can now save a game in progress

Update 4: fixed a file pointer leak, improved the numbers font

Update 5: no images, use vector num draw library add zoom, freedraw -- Bilgus

Change-Id: Idc476b46b6eaa10818400fa789701d5bac83467f
2024-04-28 00:21:16 -04:00
Solomon Peachy
4a52147122 configure: strip '--voice' from the 'make reconf' option list to avoid dupes
Change-Id: I09ade245023d51a7553ca6149c9c3effd2b6b9d2
2024-04-23 22:12:25 -04:00
Solomon Peachy
1a60255633 Remove obsolute 'talkclips.py' script, voice.pl does it all and more
Change-Id: Ic6c63f77d2cee1ababd9b5356b48f115cf93e1b1
2024-04-23 11:09:31 -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
ac9003546f release: Revamp release scripts
Covers bins, voices, manuals, fonts, and source tarballs.

Only thing remaining is build-info integration

Change-Id: I3a93fd87bbeb725fc8e1b38c5787e33fa00f3f37
2024-04-17 22:10:52 -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
39c9c350ae voice: Fix voicefile generation
I updated the scripts to use a generic '.enc' as the filename as we
haven't used true '.mp3' files for some time (and even then, only on the
Archos devices) but I missed the voicefont generation tool.

Change-Id: I450de9215664b6559058b175afc25aa874d11dcc
2024-04-17 09:01:45 -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
Aidan MacDonald
8bdf08cd2d Sansa e200v2: Enable thumb for bootloader by default
Thumb bootloaders were confirmed to work in this post:

https://forums.rockbox.org/index.php/topic,54768.msg253473.html#msg253473

Change-Id: Id52769b9b6a2acc167503fa61aec665f4090fdc1
2024-03-30 11:58:40 -04:00
Aidan MacDonald
9f3d83d03f tools: update shebang in thumb-cc.py
Some distros, including Ubuntu/Debian, don't provide a "python"
command unless an additional package is installed. Using "python3"
explicitly should work everywhere.

Using "/usr/bin/env" respects the user's PATH, so they can choose
a specific Python version instead of forcing the systemwide copy.

Change-Id: I02e3ead92939c42df6def79dec3dc2a62c62b1c3
2024-03-30 11:58:40 -04:00
Solomon Peachy
386b6d6bae dbtool: Make the dbtool marginally more user friendly.
* Inform you what target it is compiled for
 * Complain if it doesn't find the '.rockbox' directory
   (Instead of creating the directory if it's not found!)
 * Report basic (starting/finished) progress

Change-Id: Ic336dd686ce4419172a1c287995966d0f00e6107
2024-02-20 14:38:49 -05:00
roman.artiukhin
98ca066bd1 Fix zlib download url in rockboxdev.sh
Change-Id: If44a3f9aabf58f4cf6b3aa391f5ed176beee5628
2023-12-21 18:05:41 +02:00
Aidan MacDonald
781f955aa2 Remove structec API
In my opinion this API is just not very useful - design is kind
of questionable. There are hidden limits on the struct size and
bugs on 64-bit platforms due to assuming sizeof(long) == 4.

At the end of the day, the only major user was the tagcache and
it's actually less code size to do endian swapping manually.

Change-Id: I451c7f1a10cf3e28744c32c0f1f39a710d5cc100
2023-10-01 12:10:41 +01:00
Solomon Peachy
0f941488af dbtool: Fix red.
Apparently _most_ targets have a dbtool built as a simulator variant,
but _some_ are built as an application target.  This commit fixes
simulator-based targets, which weren't ever broken.

(Prior commits fixed things for _app_ targets, which haven't worked
 since at least 2020, maybe never..)

Change-Id: I7fef2b10e5128059b293118617701630bf3dc1fb
2023-05-25 16:27:10 -04:00