| 1 | |
| 2 | == HOW TO USE MARY IN ECLIPSE == |
| 3 | ---- |
| 4 | |
| 5 | |
| 6 | |
| 7 | This file describes how to import the MARY source code as a project into |
| 8 | Eclipse. These steps are written based on Eclipse 3.0, by Stephanie Becker and |
| 9 | Marc Schroeder. They should work under linux and, with minor adaptations, under windows. |
| 10 | |
| 11 | 1. Precondition: You must have installed the MARY TTS system including the |
| 12 | "source" package. We will refer to the installation directory |
| 13 | (e.g., "/home/myself/MARY TTS" on linux or "c:\Program Files\MARY TTS" on windows) |
| 14 | as MARY_BASE. |
| 15 | |
| 16 | 2. Verify/adapt a number of general settings in Eclipse. From the Eclipse |
| 17 | menu, select "Windows"->"Preferences...". In the dialogue window that opens, |
| 18 | verify/adapt the following settings: |
| 19 | - Source file encoding: "Workbench"->"Editors"->"Text file encoding" |
| 20 | must be UTF-8 (Note: may be under "General"->"Editors"->"Text file encoding" |
| 21 | on the Linux version of Eclipse) |
| 22 | - Java version used: "Java"->"installed JREs" must be 1.4 or 1.5 |
| 23 | - Java source compatibility: "Java"->"Compiler"->"Compliance and Classfiles" |
| 24 | "Use default compliance settings" must NOT be ticked; all of the following |
| 25 | must be set to 1.4: |
| 26 | "Compiler compliance level" |
| 27 | "Generated .class files compatibility" |
| 28 | "Source compatibility" |
| 29 | |
| 30 | 3. Import the MARY-project in Eclipse: |
| 31 | In Eclipse, select from the "File" menu "Import", then click on |
| 32 | "Existing Project into Workspace". |
| 33 | Click "Next", then "Browse" and select the mary directory MARY_BASE |
| 34 | (for example "/home/myself/MARY TTS"). |
| 35 | Then click "Finish". |
| 36 | If you get errors about jar files missing, verify the project settings |
| 37 | under "Project"->"Properties"->"Java build path"->"Libraries". Remove or |
| 38 | "Add external JARs" as appropriate -- all required .jar files should be |
| 39 | found under MARY_BASE/java. |
| 40 | |
| 41 | At this stage, the code should compile without errors. Now, we need to |
| 42 | add some more settings in order to start the MARY server from within |
| 43 | Eclipse (e.g., for quick debugging). |
| 44 | |
| 45 | 4. Define a number of environment variables. |
| 46 | a) Under linux, add to the file ~/.bashrc: |
| 47 | export MARY_BASE=/home/myself/MARY TTS |
| 48 | export SHPROT_BASE=$MARY_BASE/lib/modules/shprot |
| 49 | export LD_LIBRARY_PATH=$MARY_BASE/lib/linux:$LD_LIBRARY_PATH |
| 50 | b) Under Windows, right click "My computer"->"Properties"->"Advanced"-> |
| 51 | "Environment variables...". |
| 52 | Under "user variables", add new variables using the "New..." button: |
| 53 | MARY_BASE "c:\Program Files\MARY TTS" |
| 54 | SHPROT_BASE "c:\Program Files\MARY TTS\lib\modules\shprot" |
| 55 | Under "system variables", "Edit..." the variable "Path". To the existing |
| 56 | content of the Path variable, append the following: |
| 57 | ;c:\Program Files\MARY TTS\bin;c:\Program Files\MARY TTS\lib\windows |
| 58 | |
| 59 | 5. To define a run target: From the menu, select "Run"->"Run...". |
| 60 | Click "New" in order to add a Mary process: |
| 61 | Name=Mary, "Main"->"Main class"=de.dfki.lt.mary.Mary |
| 62 | In the "Arguments" tab, add the following lines into the "VM Arguments" |
| 63 | field: |
| 64 | |
| 65 | -Xmx256m -Dmary.base=/path/to/MARY TTS -ea |
| 66 | |
| 67 | If you don't use Java 1.5, you also have to add the following into the same |
| 68 | field: |
| 69 | |
| 70 | -Djava.endorsed.dirs="/path/to/MARY TTS/lib/endorsed" |
| 71 | |
| 72 | For debugging informations displayed in Eclipse, you also have to add the |
| 73 | following: |
| 74 | |
| 75 | -Dlog.tofile=false -Dlog.level=debug |
| 76 | |
| 77 | If you don't plan to use the Tibetan voice, add: |
| 78 | |
| 79 | -Dignore.tibetan.config |
| 80 | |
| 81 | Click "Apply" to save these settings. |
| 82 | |
| 83 | 6. If you click on "Run" now, the process will start. |
| 84 | |
| 85 | 7. Start the MARY GUI client by double-clicking the MARY client icon on the desktop |
| 86 | (or from the command line in MARY_BASE/bin/maryclient). |