Skip to content

Commit d25fc1a

Browse files
committed
updated documentation and installation instructions
1 parent 74cced5 commit d25fc1a

8 files changed

+425
-33
lines changed

LICENSE.md

+208
Large diffs are not rendered by default.

README.md

+58-28
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,85 @@
1-
README for KommHELP Talkshow
1+
# README for KommHELP Talkshow
22

33
Talkshow is a hierarchical sound board application for portable touch screen computers. It is meant to help non-speaking people.
44

5-
Talkshow is based on python and the pyglet library. It runs on Windows, OS X and Linux (not tested yet)
6-
7-
MOTIVATION
5+
## MOTIVATION
86

97
Non-speaking people depend on special devices to communicate with the people that surround them. There are devices on the market that play pre-recorded sound samples by pressing a button and allow the user to change sample sets according to context. However, these special device are ridiculously expensive.
108

119
With Talkshow, we try to provide a solution based solely on Open Source software that runs on a cheap Netbook with a touch screen.
1210

13-
LICENCE
11+
## LICENCE
12+
13+
Talkshow open source software licensed under the terms of the GPLv3, which guarantees end users (individuals, organizations, companies) the freedoms to use, study, share (copy), and modify the software. If you make changes to the code however, you need to make the source code of these changes available to the public.
14+
15+
## INSTALLATION
16+
17+
### Installation instructions when downloading windows exe:
1418

15-
Talkshow is licensed under the terms of the GPL. This means you can use it for whatever purpose you like. If you make changes to the code however, you need to make these changes available to the public.
19+
* Download the talkshow.exe file
20+
* Download and install the VLC media player from [this direct link](https://get.videolan.org/vlc/2.1.3/win32/vlc-2.1.3-win32.exe) or choose another version from [https://www.videolan.org/](https://www.videolan.org/). Please make sure it's 32 bit.
21+
* Create a folder called "content" next to the talkshow.exe file, and fill it with subfolders containing media files and optionally png images (see [usage instructions](#usage).
1622

17-
INSTALLATION
23+
You should now be able to use run talkshow. In case of problems, please send me ([email protected]) the debug.log file that was created next to the talkshow.exe file.
1824

19-
You need to install a python interpreter for your platform (ActivePython for Windows for example) and the pyglet library, and the tinyCSS library.
20-
I suggest Python version 2.7.XX for now, this module has not been tested on Python 3 and may fail.
21-
Pyglet can be found here: http://www.pyglet.org/download.html
22-
TinyCSS can be found here: http://pythonhosted.org/tinycss/ or here: https://pypi.python.org/pypi/tinycss
23-
After you have installed these components, simply put the files that make up Talkshow into a new directory, open a command line and type:
24-
<path-to-python-interpreter>/python talkshow.py
25+
### Advanced: install from source
2526

26-
On windows, this might look like this:
27+
Please see [installation from source](doc/INSTALLATION_FROM_PYHON_SOURCE) if you want to run the python source version of KommHELP talkshow or if you want to make changes to the code.
2728

28-
c:\Python27\python talkshow.py
29-
30-
USGAE / CREATING CONTENT
29+
## USAGE / CREATING CONTENT [usage]
3130

3231
The user interface consists of colored rectangles that either play a sound or contain more colored rectangles.
33-
All rectangles have a caption and optionally may have an associated icon.
34-
You create this hierarchy of rectangles by creating a hierarchy of subdirectories in the content directory, one subdirectory per rectangle. Each subdirectory may contain more subdirectories or a sound file in wav format and an image in png format that will be used as the rectangle's icon. The sound file will be played once the rectangle is touched in the UI. The name of the directory will be used as the caption of the rectangle.
32+
All rectangles have a caption and optionally may have an associated icon (.png).
33+
You create this hierarchy of rectangles by creating a hierarchy of subdirectories in the content directory, one subdirectory per rectangle. Each subdirectory may contain more subdirectories or a sound file (see [supported formats](#formats) and an image that will be used as the rectangle's icon. The sound file will be played once the rectangle is touched in the User Interface. The name of the directory will be used as the caption of the rectangle if there is no image.
34+
3535
See the provided content directory structure as an example.
3636

37-
If you create sample sets this way, please make them available to the public. I would be happy to hear about it. (my email address is at the end of this file)
37+
If you create sample sets this way, please make them available to the public. I would be happy to hear about it, please contact [http://kommhelp.de/](http://kommhelp.de/index.php/impressum-kontakt-top) [email protected]
3838

3939
The buttons to the left have the following meaning: 1) Play an alarm signal, 2) go to upper directory ("content"), 3) go back one level, 4) quit the program.
4040
The buttons to the right allow you to set the volume of the program (it's the program's internal volume, not your computer master volume)
4141

42-
TROUBLESHOOTING
42+
## TROUBLESHOOTING
43+
44+
A log file called `debug.log` and `warn.log` is created in the folder of the executable: any errors occurring will be logged there. In case of issues, send us an email and attach both files, so it's easier for us to find out what the problem is.
45+
46+
## Technical details
47+
48+
KommHELP Talkshow has been written in Python and requires :
49+
50+
* Python pyglet library (bundled with the .exe file, BSD licensed)
51+
* Python tinycss library (bundled with the .exe file, BSD licensed)
52+
* VLC media player (more precisely the libvlc part of VLC. VLC needs to be installed separately, GPL licensed)
53+
54+
It has been tested on Windows and linux, but should also work on Mac OS (not tested yet). It is based on 32bit Python 2.7 with the VLC 32 bit version. If both VLC and your version of Python are 64 bit, it can also work without further changes.
55+
56+
See [installation from source](doc/INSTALLATION_FROM_PYHON_SOURCE) for more details on dependencies.
57+
58+
## BACKGROUND
59+
60+
KommHELP is a non-profit association based in Berlin, Germany that develops hardware and software solutions for people with special communication needs. More information (in German) can be found here: [http://kommhelp.de/](http://kommhelp.de/)
61+
62+
### Developers:
63+
64+
* November, 7th 2009 -- Jan Bölsche <[email protected]>
65+
* ...?
66+
* February 2013 - February 2014 -- Joé Schaul <[email protected]>
67+
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
4380

44-
If you encounter an error message like this:
45-
"TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'", read about it here http://overooped.com/post/93720695/deathtroid-crash
46-
A log file called warn.log is created in the folder of the executable: any errors occurring will be logged there. In case of issues, send me (Joé) an email and attach the warn.log file, so it's easier for me to figure out what the problem is.
4781

48-
BACKGROUND
4982

50-
KommHELP is a non-profit association based in Berlin, Germany that develops hardware and software solutions for people with special communication needs. More information (in German) can be found here: http://kommhelp.de/
5183

5284

53-
-- November, 7th 2009 -- Jan Bölsche <[email protected]>
5485

55-
-- 23rd June 2013 -- Joé Schaul <joe.schaul gmail.com (replace the spaces with an @)>
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
## Installation instructions from python source under Windows
3+
4+
This section is meant for developers or people who wish to change the functionality of the KommHELP talkshow application. A normal user should not need to read this section, please refer instead to the [INSTALLATION](../README.md#INSTALLATION) section.
5+
6+
See [other operating systems](#other) if you're not on Windows.
7+
8+
### Step 1: Install Python
9+
10+
* Download python 2.7.6 for 32 bit from [http://www.python.org/download](http://www.python.org/download)
11+
it is important that the python version is at least 2.7, but not version 3.something. It is also important that the python version is for 32 bit systems, even if you have a 64 bit computer. So for Windows it's [Python 2.7.6 Windows Installer](http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi)
12+
* Install Python to a place you can find, for example `C:\Python27_32bit` Ideally the path should contain no spaces as that could create problems.
13+
14+
For the rest of this document I will assume you installed python to `C:\Python27_32bit`. If that is not the case, please adapt the paths below to match you installation path.
15+
16+
17+
### Step 2: Install "pip" package manager, and with pip install the python dependencies "tinycss" and "pyglet" [pip]
18+
19+
* download PIP for windows: [https://sites.google.com/site/pydatalog/python/pip-for-windows](https://sites.google.com/site/pydatalog/python/pip-for-windows)
20+
* open the downloaded file, it might open a few command line windows and ask you to press a key - just press enter and wait for it to download what's necessary. Point it to your python executable (for example `C:\Python27_32bit\python.exe`):
21+
![pip1](pip-win1.png)
22+
Next, enter `pip install tinycss pyglet` into the second text field, and press `Run`:
23+
![pip1](pip-win2.png)
24+
25+
### Step 3: Configure python on your system
26+
27+
Open a command line and enter: `python`
28+
You should get something like this:
29+
30+
```
31+
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
32+
Type "help", "copyright", "credits" or "license" for more information.
33+
```
34+
35+
type `exit()` to get out of the Python shell.
36+
37+
#### if the above does not work or if you get the wrong python version:
38+
39+
The python is not available on your system path and you need to add it. Open system environment variables, find the entry for "Path" and add the directory of your python installation, and the `Scripts` subfolder to the beginning, separated by `;` and followed by a `;` sign:
40+
41+
```
42+
C:\Python27_32bit;C:\Python27_32bit\Scripts;someotherpaths
43+
```
44+
45+
If you get the wrong python version, change the Path variable so that it points to the correct installation directory instead. Please be careful during this step and ensure all paths are correctly separated with a `;` symbol.
46+
After you added system variables, close your command line, and re-open it again (so it refreshes the Path variable)
47+
48+
### Step 4: Download and install VLC
49+
50+
Get VLC from [this direct link](https://get.videolan.org/vlc/2.1.3/win32/vlc-2.1.3-win32.exe) or choose another version from [https://www.videolan.org/](https://www.videolan.org/). Please make sure it's 32 bit.
51+
52+
### Step 5: Confirm you can start talkshow
53+
54+
Double-click on the talkshow.py file, or, if that does not work, from a terminal, enter:
55+
56+
```
57+
python path_to_talkshow_folder\talkshow.py
58+
```
59+
or
60+
```
61+
C:\Python27_32bit\python.exe path_to_talkshow_folder\talkshow.py
62+
```
63+
64+
### How to distribute kommHelp talkshow as a windows binary: Compile python sources to .exe executable
65+
66+
Download and install **pywin32** from this [direct link](http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win32-py2.7.exe/download) (if it does not work, find the version you need from here: [http://sourceforge.net/projects/pywin32/files/](http://sourceforge.net/projects/pywin32/files/)
67+
68+
Install **pyinstaller** with pip: `pip install pyinstaller` (see [Step 2 for how to get pip on Windows](#pip)).
69+
70+
Check that `pyinstaller` on the command line works. If not, you need to add `C:\Python27_32bit\Scripts` to your environment variables.
71+
72+
Change directory to the folder containing the talkshow.py file: `cd your\path\to\the\directory\with\talkshow`
73+
Then execute the pyinstaller command with the following arguments:
74+
75+
```
76+
pyinstaller talkshow_noVLC.spec --clean -noconfirm --noconsole --onefile
77+
```
78+
79+
if you have the libvlc.dll, libvlccore.dll and the vlc plugins directory in the same directory than the talkshow.py file you can also use the talkshow_full.spec file to include VLC in the windows binary.
80+
81+
This will generate a `talkshow.exe` file under `dist\talkshow` containing all the needed dependencies that you can distribute. You need to provide your own `content` folder alongside.
82+
83+
84+
### Other Operating Systems [other]
85+
86+
If you have Python 2.7, download [pip](http://www.pip-installer.org/en/latest/installing.html) and then do
87+
88+
```
89+
pip install pyglet tinycss pyinstaller
90+
```
91+
92+
if you have another version of python, install 32 bit Python 2.7, and then get Virtualenv from [here](http://www.verious.com/code/CharleneJiang/virtualenv-burrito/), and use it to make a python virtual environment for this version of python. Then, once in that shell, execute the above pip command (virtualenv comes bundled with pip).
93+
94+
Then you need to install [VLC](https://www.videolan.org/vlc/) if you don't have it already. Please see the sections above for more details on dependencies.
95+
96+

doc/pip-win1.png

7.14 KB
Loading

doc/pip-win2.png

2.38 KB
Loading

talkshow.py

-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
except:
3232
logger.error("There is a problem with VLC. Either you are using the wrong version of talkshow (32/64 bit), or there is a bug in the code, or you can try and install VLC.")
3333

34-
try:
35-
os.path.isdir
36-
except:
37-
logger.error("There is a problem with VLC. Either you are using the wrong version of talkshow (32/64 bit), or there is a bug in the code, or you can try and install VLC.")
38-
3934

4035
try:
4136
import CommandBar
File renamed without changes.

talkshow_noVLC.spec

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# -*- mode: python -*-
2+
a = Analysis(['talkshow.py'],
3+
pathex=['.'],
4+
hiddenimports=[],
5+
hookspath=None,
6+
runtime_hooks=None)
7+
8+
9+
def Datafiles(*filenames, **kw):
10+
import os
11+
12+
def datafile(path, strip_path=True):
13+
parts = path.split('/')
14+
path = name = os.path.join(*parts)
15+
if strip_path:
16+
name = os.path.basename(path)
17+
return name, path, 'DATA'
18+
19+
strip_path = kw.get('strip_path', True)
20+
return TOC(
21+
datafile(filename, strip_path=strip_path)
22+
for filename in filenames
23+
if os.path.isfile(filename))
24+
25+
26+
data_list = []
27+
for dirname, dirnames, filenames in os.walk('style'):
28+
for filename in filenames:
29+
data_list.append(os.path.join(dirname, filename))
30+
style = Datafiles(*data_list, strip_path=False)
31+
32+
33+
data_list = []
34+
for dirname, dirnames, filenames in os.walk('alarm'):
35+
for filename in filenames:
36+
data_list.append(os.path.join(dirname, filename))
37+
alarm = Datafiles(*data_list, strip_path=False)
38+
39+
40+
# add static files
41+
other_data_files = Datafiles('README.md')
42+
43+
44+
45+
pyz = PYZ(a.pure)
46+
exe = EXE(pyz,
47+
a.scripts,
48+
exclude_binaries=True,
49+
name='talkshow.exe',
50+
debug=False,
51+
strip=None,
52+
upx=True,
53+
console=True )
54+
coll = COLLECT(exe,
55+
a.binaries,
56+
a.zipfiles,
57+
a.datas,
58+
style,
59+
alarm,
60+
other_data_files,
61+
strip=None,
62+
upx=True,
63+
name='talkshow')

0 commit comments

Comments
 (0)