dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 1 | # ChromeVox on Desktop Linux |
| 2 | |
| 3 | ## Starting ChromeVox |
| 4 | |
| 5 | On Chrome OS, you can enable spoken feedback (ChromeVox) by pressing Ctrl+Alt+Z. |
| 6 | |
| 7 | If you have a Chromebook, this gives you speech support built-in. If you're |
| 8 | building Chrome from source and running it on desktop Linux, speech and braille |
| 9 | won't be included by default. Here's how to enable it. |
| 10 | |
| 11 | ## Compiling the Chrome OS version of Chrome |
| 12 | |
| 13 | First follow the public instructions for |
| 14 | [Chrome checkout and build](https://www.chromium.org/developers/how-tos/get-the-code). |
| 15 | |
Zach Helfinstein | 46d2ecae | 2018-07-27 18:28:36 | [diff] [blame] | 16 | Edit `.gclient` (in `chromium/`) and at the bottom add: |
| 17 | |
| 18 | ``` |
| 19 | target_os = ["chromeos"] |
| 20 | ``` |
| 21 | |
| 22 | Run `gclient sync` to update your checkout. |
| 23 | |
| 24 | Then create a GN configuration with "chromeos" as the target OS, for example: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 25 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 26 | ``` |
| 27 | gn args out/cros |
| 28 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 29 | |
| 30 | ...in editor, add this line: |
| 31 | |
| 32 | ``` |
| 33 | target_os = "chromeos" |
| 34 | is_component_build = true |
| 35 | is_debug = false |
| 36 | ``` |
| 37 | |
| 38 | Note: Only ```target_os = "chromeos"``` is required, the others are recommended |
| 39 | for a good experience but you can configure Chrome however you like otherwise. |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 40 | Note that Native Client is required, so do not put `enable_nacl = false` in |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 41 | your file anywhere! |
| 42 | |
| 43 | Now build Chrome as usual, e.g.: |
| 44 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 45 | ``` |
Max Moroz | f5b31fcd | 2018-08-10 21:55:48 | [diff] [blame] | 46 | autoninja -C out/cros chrome |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 47 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 48 | |
| 49 | And run it as usual to see a mostly-complete Chrome OS desktop inside |
| 50 | of a window: |
| 51 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 52 | ``` |
| 53 | out/cros/chrome |
| 54 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 55 | |
| 56 | By default you'll be logged in as the default user. If you want to |
| 57 | simulate the login manager too, run it like this: |
| 58 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 59 | ``` |
| 60 | out/cros/chrome --login-manager |
| 61 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 62 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 63 | You can run any of the above under it’s own X session (avoiding any window |
| 64 | manager key combo conflicts) by doing something like |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 65 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 66 | ``` |
| 67 | startx out/cros/chrome |
| 68 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 69 | |
David Tseng | c4b4301 | 2018-04-11 04:10:27 | [diff] [blame] | 70 | NOTE: if you decide to run Chrome OS under linux within a window manager, you |
| 71 | are subject to its keybindings which will most certainly conflict with |
| 72 | ChromeVox. The Search key (which gets mapped from LWIN/key code 91), usually |
| 73 | gets assigned to numerous shortcut combinations. You can manually disable all |
| 74 | such combinations, or run under X as described above. |
| 75 | |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 76 | ## Speech |
| 77 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 78 | If you want speech, you just need to copy the speech synthesis data files to |
| 79 | /usr/share like it would be on a Chrome OS device: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 80 | |
| 81 | ``` |
David Tseng | 1bb2aa7a | 2020-02-26 19:11:05 | [diff] [blame^] | 82 | gsutil ls gs://chromeos-localmirror/distfiles/googletts* |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 83 | ``` |
| 84 | |
David Tseng | 1bb2aa7a | 2020-02-26 19:11:05 | [diff] [blame^] | 85 | Pick the latest version and |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 86 | |
| 87 | ``` |
David Tseng | 1bb2aa7a | 2020-02-26 19:11:05 | [diff] [blame^] | 88 | gsutil cp gs://chromeos-localmirror/distfiles/googletts-13.1.tar.xz /usr/share/chromeos-assets/speech_synthesis/patts/ |
| 89 | tar xvf /usr/share/chromeos-assets/speech_synthesis/patts/googletts-13.1.tar.xz |
| 90 | rm /usr/share/chromeos-assets/speech_synthesis/patts/googletts-13.1.tar.xz |
Katie Dektar | 8ea0d42 | 2017-09-18 19:45:17 | [diff] [blame] | 91 | ``` |
| 92 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 93 | **Be sure to check permissions of /usr/share/chromeos-assets, some users report |
| 94 | they need to chmod or chown too, it really depends on your system.** |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 95 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 96 | After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press |
| 97 | Ctrl+Alt+Z, and you should hear it speak! If not, check the logs. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 98 | |
Katie D | c9912db | 2018-12-20 01:24:49 | [diff] [blame] | 99 | ### eSpeak |
| 100 | |
| 101 | To get [eSpeak](espeak.md) on Chrome OS on Desktop Linux, copy the eSpeak |
| 102 | extension (chrome branch) to the same place: |
| 103 | |
| 104 | ``` |
| 105 | cd ~ |
| 106 | git clone https://chromium.googlesource.com/chromiumos/third_party/espeak-ng |
| 107 | cd espeak-ng |
| 108 | git checkout chrome |
| 109 | sudo cp -r chrome-extension /usr/share/chromeos-assets/speech_synthesis/espeak-ng |
| 110 | ``` |
| 111 | |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 112 | ## Braille |
| 113 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 114 | ChromeVox uses extension APIs to deliver braille to Brltty through libbrlapi |
| 115 | and uses Liblouis to perform translation and backtranslation. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 116 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 117 | Once built, Chrome and ChromeVox will use your machine’s running Brltty |
| 118 | daemon to display braille if ChromeVox is running. Simply ensure you have a |
| 119 | display connected before running Chrome and that Brltty is running. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 120 | |
David Tseng | e34a52f | 2018-10-23 01:09:32 | [diff] [blame] | 121 | Note you may need to customize brltty.conf (typically found in /etc). |
| 122 | In particular, the api-parameters Auth param may exclude the current user. |
| 123 | You can turn this off by doing: |
| 124 | api-parameters Auth=none |
| 125 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 126 | Testing against the latest releases of Brltty (e.g. 5.4 at time of writing) is |
| 127 | encouraged. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 128 | |
| 129 | For more general information, see [ChromeVox](chromevox.md) |
| 130 | |
| 131 | # Using ChromeVox |
| 132 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 133 | ChromeVox keyboard shortcuts use Search. On Linux that's usually your Windows |
| 134 | key. If some shortcuts don't work, you may need to remove Gnome keyboard |
| 135 | shortcut bindings, or use "startx", as suggested above, or remap it. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 136 | |
| 137 | * Search+Space: Click |
| 138 | * Search+Left/Right: navigate linearly |
| 139 | * Search+Period: Open ChromeVox menus |
| 140 | * Search+H: jump to next heading on page |