Skip to content

Commit

Permalink
added service name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
GilMM27 committed Jan 30, 2025
1 parent 856f892 commit 388c041
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions hri/packages/speech/config/hear.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ hear:
ros__parameters:
STT_SERVER_IP: "127.0.0.1:50051"
START_SERVICE: True
STT_SERVICE_NAME: "stt_service"
detection_publish_topic: "/keyword_detected"
7 changes: 6 additions & 1 deletion hri/packages/speech/scripts/hear.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ def __init__(self):
.get_parameter_value()
.bool_value
)
service_name = (
self.declare_parameter("STT_SERVICE_NAME", "stt_service")
.get_parameter_value()
.string_value
)

# Initialize the Whisper gRPC client
self.client = WhisperClient(server_ip)
Expand Down Expand Up @@ -85,7 +90,7 @@ def __init__(self):
)
self.stt_service = self.create_service(
STT,
"stt_service",
service_name,
self.stt_service_callback,
callback_group=service_group,
)
Expand Down

0 comments on commit 388c041

Please sign in to comment.