How eloquent-algorithmics/automotive-ai works
Automotive AI is a voice-activated vehicle diagnostic assistant. The main workflow starts in app.py, selects voice handling with or without an ELM327 device, recognizes commands, and dispatches vehicle queries or connected services; responses can be spoken back. Separate capabilities cover diagnostic reports, live OBD-II data, conversational AI and search, and Google or Microsoft email/calendar. Relationships follow the sampled calls, source-index references, or README; unsampled implementation details are omitted where wiring is uncertain.
Main entry points: app.py Application entry · voice_recognition.py Voice command handling · elm327.py ELM voice handling · serial_commands.py OBD commands and reports
Components 20
Application and voice
- Application entry
app.py - Voice command handling
voice/voice_recognition.py - ELM voice handling
voice/elm327.py - Command definitions
utils/commands.py - Runtime configuration
config.py
Vehicle diagnostics
- OBD commands and reports
utils/serial_commands.py - VIN decoding
api/nhtsa_functions/vin_decoder.py - Live OBD stream
datastreams/flask_air_fuel_datastream.py
AI and speech
- OpenAI chat
api/openai_functions/gpt_chat.py - Google custom search
utils/functions.py - Speech output
audio/audio_output.py
Connected services
- Google email and calendar
api/google_functions/google_api.py - Microsoft authorization
api/microsoft_functions/ms_authserver.py - Microsoft Graph services
api/microsoft_functions/graph_api.py
Other components
- Driver
- ELM327 device
- Speech services
- Google APIs
- Microsoft Graph
- NHTSA vehicle data
Connections 27
- Driver → Application entry: starts
README.md - Application entry → OpenAI chat: greets with
app.py - Application entry → Speech output: speaks greeting
app.py - Application entry → Voice command handling: starts voice mode
app.py - Application entry → ELM voice handling: starts device mode
app.py - Application entry → Microsoft authorization: gets authorization
app.py - Application entry → Microsoft Graph services: initializes Graph
app.py - Voice command handling → Command definitions: uses commands
voice/voice_recognition.py - Voice command handling → OpenAI chat: handles conversation
voice/voice_recognition.py - Voice command handling → Speech output: speaks responses
voice/voice_recognition.py - Voice command handling → Google email and calendar: dispatches Google tasks
voice/voice_recognition.py - Voice command handling → Microsoft Graph services: dispatches Microsoft tasks
voice/voice_recognition.py - ELM voice handling → Voice command handling: uses common commands
voice/elm327.py - ELM voice handling → OBD commands and reports: sends vehicle commands
voice/elm327.py - ELM voice handling → Live OBD stream: starts data stream
voice/elm327.py - ELM voice handling → ELM327 device: communicates over serial
voice/elm327.py - OBD commands and reports → ELM327 device: sends diagnostic queries
utils/serial_commands.py - OBD commands and reports → VIN decoding: decodes VIN
utils/serial_commands.py - OBD commands and reports → NHTSA vehicle data: requests vehicle data
utils/serial_commands.py - OBD commands and reports → Microsoft Graph services: emails diagnostic report
utils/serial_commands.py - Live OBD stream → ELM327 device: queries sensors
datastreams/flask_air_fuel_datastream.py - OpenAI chat → Google custom search: calls search tool
api/openai_functions/gpt_chat.py - OpenAI chat → Speech output: returns spoken response
voice/voice_recognition.py - Speech output → Speech services: synthesizes audio
audio/audio_output.py - Google email and calendar → Google APIs: calls email and calendar APIs
api/google_functions/google_api.py - Microsoft authorization → Microsoft Graph: authorizes account
api/microsoft_functions/ms_authserver.py - Microsoft Graph services → Microsoft Graph: requests mail and calendar
api/microsoft_functions/graph_api.py