فهرست منبع

update doc and supported python version in setup.py

nico 8 سال پیش
والد
کامیت
d79982b830

+ 66 - 0
Docs/player.md

@@ -0,0 +1,66 @@
+# Players                                                                                                                                         # Players
+
+The player is the library/software used to make Kalliope talk.
+With Kalliope project, you can set whatever sound player you want to use.
+
+## Settings
+
+Define the player you want to use by default in the [setting.yml](settings.md) file.
+```yml
+default_player: "player_name"
+```
+
+E.g
+```yml
+default_player: "mplayer"
+```
+
+Then, still in the [setting.yml](settings.md) file, each player must set up its configuration following the 'players' tag :
+```yml
+players:
+   - player1:
+      player1parameter1: "value option1"
+      player1parameter2: "value option2"
+   - player2:
+      player2parameter1: "value option1"
+```
+
+E.g
+```yml
+players:
+  - mplayer: {}
+  - pyalsaaudio:
+     device: "default"
+     convert_to_wav: True
+  - pyaudioplayer:
+     convert_to_wav: True
+  - sounddeviceplayer:
+     convert_to_wav: True
+```
+
+>**Note:** Sometime, parameters will be necessary to use an engine. 
+Click on a Player engine link in the `Current CORE Available Players` section to know which parameter are required.
+
+>**Note:** A player which does not ask for input parameters need to be declared as an empty dict. E.g: ```- player_name: {}```
+
+## Current CORE Available Players
+
+Core players are already packaged with the installation of Kalliope an can be used out of the box. See the [complete list here](player_list.md).
+
+## Full Example
+
+In the settings.yml file :
+
+```yml
+default_player: "mplayer"
+
+players:
+  - mplayer: {}
+  - pyalsaaudio:
+     device: "default"
+     convert_to_wav: True
+  - pyaudioplayer:
+     convert_to_wav: True
+  - sounddeviceplayer:
+     convert_to_wav: True
+```

+ 6 - 6
Docs/player_list.md

@@ -6,12 +6,12 @@ You can define them in your [settings.yml file](settings.md).
 ## Core Players
 Core Players are already packaged with the installation of Kalliope an can be used out of the box.
 
-|        Name       | Description                                                                    | Note                |
-|-------------------|--------------------------------------------------------------------------------|---------------------|
-| mplayer           | [mplayer](http://www.mplayerhq.hu/design7/news.html)                           |                     |
-| AlsaAudioPlayer   | [AlsaAudioPlayer](https://larsimmisch.github.io/pyalsaaudio/libalsaaudio.html) | Does not handle mp3 |
-| PyAudioPlayer     | [PyAudioPlayer](https://people.csail.mit.edu/hubert/pyaudio/)                  | Does not handle mp3 |
-| SoundDevicePlayer | [SoundDevicePlayer](https://pypi.python.org/pypi/sounddevice)                  | Does not handle mp3 |
+| Name              | Description                                                          | Note                                                                                    |
+|-------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
+| mplayer           | [mplayer](../kalliope/players/mplayer/README.md)                     | Based on [mplayer software](http://www.mplayerhq.hu/design7/news.html)                  |
+| pyalsaaudio       | [AlsaAudioPlayer](../kalliope/players/pyalsaaudio/README.md)         | Based on [pyalsaaudio](https://larsimmisch.github.io/pyalsaaudio/libalsaaudio.html) lib |
+| pyaudioplayer     | [PyAudioPlayer](../kalliope/players/pyaudioplayer/README.md)         | Based on [pyaudio](https://people.csail.mit.edu/hubert/pyaudio/docs/) lib               |
+| sounddeviceplayer | [SoundDevicePlayer](../kalliope/players/sounddeviceplayer/README.md) | Based on [sounddevice](https://pypi.python.org/pypi/sounddevice) lib                    |
 
 ## Community Players
 Community Players need to be installed manually.

+ 10 - 3
README.md

@@ -1,10 +1,14 @@
+<p align="center">
+    <img src="images/Kalliope_logo_large.png">
+</p>
+
+# Kalliope
 [![Build Status](https://travis-ci.org/kalliope-project/kalliope.svg)](https://travis-ci.org/kalliope-project/kalliope)
 [![Coverage Status](https://coveralls.io/repos/github/kalliope-project/kalliope/badge.svg)](https://coveralls.io/github/kalliope-project/kalliope)
 [![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/kalliope-project/Lobby)
+[![PyPI version](https://badge.fury.io/py/kalliope.svg)](https://badge.fury.io/py/kalliope)
+[![PyPI](https://img.shields.io/pypi/pyversions/kalliope.svg)](https://pypi.python.org/pypi/kalliope/)
 
-<p align="center">
-    <img src="images/Kalliope_logo_large.png">
-</p>
 
 Kalliope is a modular always-on voice controlled personal assistant designed for home automation.
 Kalliope is based on audio input recognition, so it recognize an order pronounced by the user and then execute actions attached to the order.
@@ -53,6 +57,7 @@ Once installed, you can start learning basics of Kalliope from a [quick start co
 | [TTS](Docs/tts.md)                 | Text to speech configuration                                                                |
 | [Triggers](Docs/trigger.md)        | Magic hotword engine used to make Kalliope listening for an order                           |
 | [REST API](Docs/rest_api.md)       | Integrated REST API. Can be used to send an order                                           |
+| [Players](Docs/player.md)          | Player is the software used to make kalliope talk                                           |
 
 ## Contributing
 
@@ -62,6 +67,8 @@ Reading through this guide before writing any code is recommended.
 - Read the [contributing guide](Docs/contributing.md)
 - Add [issues and feature requests](../../issues)
 
+You liked kalliope? **Star us!**
+
 ## Credits
 
 > **Meaning of Kalliope** Kalliope means "beautiful voice" from Greek καλλος (kallos) "beauty" and οψ (ops) "voice". 

+ 13 - 1
kalliope/players/mplayer/README.md

@@ -1,10 +1,22 @@
 ### Mplayer
 
+Default player of kalliope.
 This Player is based on the [mplayer engine](http://www.mplayerhq.hu/design7/news.html)
 
+### Input parameters
+
 | Parameters | Required | Default | Choices    | Comment |
 |------------|----------|---------|------------|---------|
-|
+
+
+### Example settings
+```yml
+default_player: "mplayer"
+
+players:
+  - mplayer: {}
+```
+
 #### Notes
 
 This Player handles mp3 and wav format.

+ 22 - 7
kalliope/players/pyalsaaudio/README.md

@@ -2,14 +2,29 @@
 
 This Player is based on the [alsa engine](https://larsimmisch.github.io/pyalsaaudio/libalsaaudio.html)
 
-| AlsaAudioPlayer |          |           |             |                                   |
-|-----------------|----------|-----------|-------------|-----------------------------------|
-| Parameters      | Required | Default   | Choices     | Comment                           |
-| device          | No       | "default" |             | Select the device to use for alsa |
-| convert_to_wav  | No       | TRUE      | True, False | convert the file into wav         |
+### Input parameters
+
+| parameter      | required  | default   | choices     | comment                                                         |
+|----------------|-----------|-----------|-------------|-----------------------------------------------------------------|
+| device         | no        | "default" |             | Select the device to use for alsa                               |
+| convert_to_wav | no        | TRUE      | True, False | Convert the generated file from the TTS into wav before reading |
+
+### Example settings
+
+Here is n example of configuration you would use if your TTS was acapela. As this TTS generate an MP3 file, this last need to be converted into wav.
+```yml
+default_player: "pyalsaaudio"
+
+players:
+  - pyalsaaudio:
+     device: "default"
+     convert_to_wav: True
+```
 
 #### Notes
 
-Ability to define the device to use.
-This Player does not handle mp3 format, converting mp3 to wav might be required.
+Define the default card to use in the `device` parameter.
+For example, on a Raspberry Pi, the default card can be `sysdefault:CARD=ALSA`
+
+This Player does not handle mp3 format, converting mp3 to wav might be required if the selected TTS engine generate mp3 file.
 

+ 17 - 4
kalliope/players/pyaudioplayer/README.md

@@ -2,10 +2,23 @@
 
 This Player is based on the [pyaudio engine](https://people.csail.mit.edu/hubert/pyaudio/)
 
-| PyAudioPlayer |          |           |             |                           |
-|-----------------|----------|-----------|-------------|---------------------------|
-| Parameters      | Required | Default   | Choices     | Comment                   |
-| convert_to_wav  | No       | TRUE      | True, False | convert the file into wav |
+### Input parameters
+
+| parameter      | required  | default   | choices     | comment                                                         |
+|----------------|-----------|-----------|-------------|-----------------------------------------------------------------|
+| convert_to_wav | no        | TRUE      | True, False | Convert the generated file from the TTS into wav before reading |
+
+
+### Example settings
+
+```yml
+default_player: "pyaudioplayer"
+
+players:  
+  - pyaudioplayer:
+     convert_to_wav: True
+```
+
 
 #### Notes
 

+ 16 - 4
kalliope/players/sounddeviceplayer/README.md

@@ -2,10 +2,22 @@
 
 This Player is based on the [sounddevice and soundfile engines](https://pypi.python.org/pypi/sounddevice)
 
-| SoundDevicePlayer |          |           |             |                           |
-|-----------------|----------|-----------|-------------|---------------------------|
-| Parameters      | Required | Default   | Choices     | Comment                   |
-| convert_to_wav  | No       | TRUE      | True, False | convert the file into wav |
+### Input parameters
+
+| parameter      | required  | default   | choices     | comment                                                         |
+|----------------|-----------|-----------|-------------|-----------------------------------------------------------------|
+| convert_to_wav | no        | TRUE      | True, False | Convert the generated file from the TTS into wav before reading |
+
+
+### Example settings
+
+```yml
+default_player: "sounddeviceplayer"
+
+players:  
+  - sounddeviceplayer:
+     convert_to_wav: True
+```
 
 #### Notes
 

+ 4 - 2
setup.py

@@ -50,12 +50,15 @@ setup(
         'Operating System :: POSIX :: Linux',
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: 3.6',
         'Topic :: Home Automation',
         'Topic :: Multimedia :: Sound/Audio :: Speech',
         'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
         'Topic :: Scientific/Engineering :: Artificial Intelligence'
     ],
-    keywords='assistant bot TTS STT',
+    keywords='assistant bot TTS STT jarvis',
 
     # included packages
     packages=find_packages(exclude=['contrib', 'docs', 'tests']),
@@ -112,4 +115,3 @@ setup(
         ],
     },
 )
-