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 | ``` |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 82 | sudo git clone https://chromium.googlesource.com/chromiumos/platform/assets /usr/share/chromeos-assets |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 83 | ``` |
| 84 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 85 | Change the permissions: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 86 | |
| 87 | ``` |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 88 | sudo find /usr/share/chromeos-assets -type f -exec chmod 644 {} \; |
| 89 | sudo find /usr/share/chromeos-assets -type d -exec chmod 755 {} \; |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 90 | ``` |
| 91 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 92 | Next, unzip the NaCl executables. You only need to do the one for your host |
| 93 | architecture: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 94 | |
| 95 | ``` |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 96 | PATTS_DIR=/usr/share/chromeos-assets/speech_synthesis/patts |
Katie D | 11cc61c | 2018-01-19 17:57:45 | [diff] [blame] | 97 | sudo unzip $PATTS_DIR/tts_service_x86_64.nexe.zip -d $PATTS_DIR |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 98 | ``` |
| 99 | |
Katie Dektar | 8ea0d42 | 2017-09-18 19:45:17 | [diff] [blame] | 100 | You may need to update permissions for the unzipped files within within |
| 101 | speech_synthesis/patts: |
| 102 | |
| 103 | ``` |
| 104 | sudo find $PATTS_DIR -type f -exec chmod 755 {} \; |
| 105 | ``` |
| 106 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 107 | **Be sure to check permissions of /usr/share/chromeos-assets, some users report |
| 108 | they need to chmod or chown too, it really depends on your system.** |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 109 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 110 | After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press |
| 111 | Ctrl+Alt+Z, and you should hear it speak! If not, check the logs. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 112 | |
Katie D | c9912db | 2018-12-20 01:24:49 | [diff] [blame] | 113 | ### eSpeak |
| 114 | |
| 115 | To get [eSpeak](espeak.md) on Chrome OS on Desktop Linux, copy the eSpeak |
| 116 | extension (chrome branch) to the same place: |
| 117 | |
| 118 | ``` |
| 119 | cd ~ |
| 120 | git clone https://chromium.googlesource.com/chromiumos/third_party/espeak-ng |
| 121 | cd espeak-ng |
| 122 | git checkout chrome |
| 123 | sudo cp -r chrome-extension /usr/share/chromeos-assets/speech_synthesis/espeak-ng |
| 124 | ``` |
| 125 | |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 126 | ## Braille |
| 127 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 128 | ChromeVox uses extension APIs to deliver braille to Brltty through libbrlapi |
| 129 | and uses Liblouis to perform translation and backtranslation. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 130 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 131 | Once built, Chrome and ChromeVox will use your machine’s running Brltty |
| 132 | daemon to display braille if ChromeVox is running. Simply ensure you have a |
| 133 | display connected before running Chrome and that Brltty is running. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 134 | |
David Tseng | e34a52f | 2018-10-23 01:09:32 | [diff] [blame] | 135 | Note you may need to customize brltty.conf (typically found in /etc). |
| 136 | In particular, the api-parameters Auth param may exclude the current user. |
| 137 | You can turn this off by doing: |
| 138 | api-parameters Auth=none |
| 139 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 140 | Testing against the latest releases of Brltty (e.g. 5.4 at time of writing) is |
| 141 | encouraged. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 142 | |
| 143 | For more general information, see [ChromeVox](chromevox.md) |
| 144 | |
| 145 | # Using ChromeVox |
| 146 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 147 | ChromeVox keyboard shortcuts use Search. On Linux that's usually your Windows |
| 148 | key. If some shortcuts don't work, you may need to remove Gnome keyboard |
| 149 | shortcut bindings, or use "startx", as suggested above, or remap it. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 150 | |
| 151 | * Search+Space: Click |
| 152 | * Search+Left/Right: navigate linearly |
| 153 | * Search+Period: Open ChromeVox menus |
| 154 | * Search+H: jump to next heading on page |