# Copyright Nicolai Bæk Thomsen
# Author: Nicolai Bæk Thomsen, Dept. Electronic Systems, Aalborg University
# Date: 3/3 2017
# 
################################################################################
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You can obtain a copy of the GNU General Public License from
#   http://www.gnu.org/copyleft/gpl.html or by writing to
#   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
################################################################################

- Introduction:
The code is intended to run in the Robot Operating System (ROS) framework, however much of the interface with audio (recording and playback) is 
written specfically for this custom system, thus it may not function on other systems.

- Content: 
This archive contains the following:
speech_navigation/
	- config/my_laser_config.yaml: config file for filtering the output from laser scanner
	- launch/speech_navigation.launch: Launch file for running entire system
	- scripts/find_speaker.py: Python file containing the actual algorithm for finding the speech source
	- scripts/get_audio_segment_server_duo.py: ROS service for recording audio
	- scripts/say_text_server.py: ROS service for converting text to speech and then playing it

- Instructions on interface:
The setup is intended to run distributed, in the sense that all processing is done on a base machine and not the onboard computer. Because of this some hardware specific code has been written to interface with audio, which is supplied here, but may not work on other systems.

- Dependencies:
The system is intended for a TurtleBot, thus either this must be used or the launch file should be altered to work with another platform. The same goes for the microphone array(s) 
and laser scanner.

- Instructions:
It is important to set the IP addresses correct in the launch file. Furthermore, some places in find_speaker.py node addresses have been hard coded, hence they should be set correctly on any new system.

Steps:
1: Copy folder to your catkin workspace
2: Run catkin_make in your catkin workspace
3: Change f_name in say_text_server.py to point at a valid destination
4: roslaunch speech_navigation speech_navigation.launch