RAPP Platform  v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
 All Classes Namespaces Files Functions Variables Macros
global_parameters.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 
3 #Copyright 2015 RAPP
4 
5 #Licensed under the Apache License, Version 2.0 (the "License");
6 #you may not use this file except in compliance with the License.
7 #You may obtain a copy of the License at
8 
9  #http://www.apache.org/licenses/LICENSE-2.0
10 
11 #Unless required by applicable law or agreed to in writing, software
12 #distributed under the License is distributed on an "AS IS" BASIS,
13 #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #See the License for the specific language governing permissions and
15 #limitations under the License.
16 
17 import os
18 import rospkg
19 
20 ## @class GlobalParams
21 # @brief Contains global Sphinx parameters
23  def __init__(self):
24  self.rospack = rospkg.RosPack()
25 
26  ## Java libraries path
27  self._sphinx_jar_files_url = self.rospack.get_path("rapp_sphinx4_java_libraries")
28  ## Sphinx package path
29  self._sphinx_package_url = self.rospack.get_path("rapp_speech_detection_sphinx4")
30  ## Language models path
31  self._language_models_url = self.rospack.get_path("rapp_sphinx4_language_models")
32  ## Temporary language models path
33  self._tmp_language_models_url = os.path.join( os.environ['HOME'], \
34  'rapp_platform_files/rapp_speech_recognition_sphinx4/' )
35  ## Noise profiles path
36  self._noise_profiles_url = self.rospack.get_path("rapp_sphinx4_noise_profiles")
37  ## Acoustic models path
38  self._acoustic_models_url = self.rospack.get_path("rapp_sphinx4_acoustic_models")
39  self._acoustic_models_url += "/english_acoustic_model"
40  ## Sphinx jar file path
41  self._sphinx_jar_file = 'sphinx4-core-1.0-20150630.174404-9.jar'
42  ## True if Sphinx is allowed output on STDIN, STDERR
43  self._allow_sphinx_output = False
44  ## IPC socket HOST parameter
45  self._socket_host = '127.0.0.1'
46  ## Sphinx preconfigurations yaml
47  self._sphinx_preconf = os.path.join( \
48  self.rospack.get_path("rapp_speech_detection_sphinx4"), 'cfg', \
49  'sphinx_configurations.yaml' )
_allow_sphinx_output
True if Sphinx is allowed output on STDIN, STDERR.