API for audio-driven, turn-by-turn navigation. Uses a split audio/data flow for initiation. Navigation steps are provided intelligently based on proximity/time. Nearby user-defined Milestones are announced directly within navigation instructions.
http://20.68.131.221:5000Authentication: YOUR_USER_ID header for all endpoints./upload_audio.application/json for location/context endpoints.The main flow involves multiple steps due to separate audio/data submission and the stateful step loop:
POST /upload_audio
Uploads the user's spoken destination query.
Authentication: YOUR_USER_ID{ "status": "AudioReceived", "upload_id": "up_..." }
Save the `upload_id`.
POST /process_query_location
Processes the query using the uploaded audio and location. Fetches milestones if navigation starts.
application/json){
"upload_id": "up_...", // From Step 1
"latitude": float,
"longitude": float,
"heading": float // Optional
}
audio_response_b64 or use TTS on prompt_text.state_id (e.g., `poi_...`) for Step 4.initial_audio_steps_b64 list or use TTS on initial_steps_text list (first few steps, may include milestone announcements at the start).navigation_session_id (e.g., `nav_...`) for Step 5 onwards.audio_response_b64 or use TTS on error_message.--- If Status was "AwaitingSelection", proceed to Steps 3 & 4 ---
POST /upload_audio
Uploads the user's spoken POI option number.
Authentication: YOUR_USER_ID{ "status": "AudioReceived", "upload_id": "up_..." }
Save the NEW `upload_id`.
POST /process_selection_location
Processes the selection, starts navigation, and fetches milestones.
application/json){
"upload_id": "up_...", // From Step 3
"state_id": "poi_..." // From Step 2
}
initial_audio_steps_b64 list or use TTS on initial_steps_text list (first few steps, may include milestone announcements at the start).navigation_session_id (e.g., `nav_...`) for Step 5 onwards.audio_response_b64 or use TTS on error_message.state_id for retry of Steps 3 & 4.--- If Status was "NavigationStarted" (from Step 2 or Step 4), proceed to Step 5 ---
POST /get_next_steps
Call periodically (e.g., every 5-10s). Server checks proximity to next turn AND nearby milestones, returning relevant instructions only.
application/json{
"navigation_session_id": "nav_...", // Session ID from Step 2 or 4
"latitude": CURRENT_LATITUDE,
"longitude": CURRENT_LONGITUDE,
"heading": CURRENT_HEADING // Optional
}
audio_steps_b64 list or use TTS on steps_text list. Nearby milestone announcements (e.g., "Park Gate ahead.") will be included as items at the beginning of these lists if applicable.audio_steps_b64 / use TTS on steps_text. Milestone announcements may be prepended.audio_message_b64 or use TTS on message. This message will include nearby milestone announcements prepended if applicable (e.g., "Library to your right. Continue. Next turn in 80 meters.").audio_message_b64 OR use TTS on message.error_message.POST /search_poi
(Stateless) Input JSON: {"query", "latitude", "longitude"}. Returns JSON: {"status":"ok", "results": [...]}.
POST /navigate
(Starts stateful session) Input JSON: {"destination_query", ...}. Returns JSON: {"status":"NavigationStarted", "navigation_session_id", ...}. Use `/get_next_steps` to continue.
GET /
Returns this HTML documentation.