Answers are grounded in this paper and cite their sources.
Cloud-based Artificial Intelligence (AI) services offer speech recognition, synthesis, and image text extraction services for use in assistive communication technology. However, there are acute challenges in integrating these services in resource-constrained embedded systems such as high latencies that interfere with real-time communication, complex authentication protocols, communication protocol overheads, and frequent API changes that jeopardize system maintainability. In this paper, a hybrid WebSocket-HTTPS architecture is introduced which is designed to match communication protocols with cloud AI service patterns, evaluated on an ESP32-S3 microcontroller, where streaming and transactional cloud AI interactions are separated, with a WebSocket bridge server handling provider-specific authentication and protocol management for the streaming service, and the transactional service accessed directly via the HTTPS protocol. The WebSocket bridge server abstracts the complexities of cloud communication protocols and allows the removal of authentication from embedded firmware and shields against API modifications. With the proposed architecture, the speech-to-text latency over WebSocket for Deepgram Nova-2 averaged 976 ms, while Azure Cognitive Services averaged 1768 ms, both of which are far below the conversational disruption threshold of 2000 ms. In contrast, HTTPS speech-to-text resulted in a mean latency of 2574 ms, about 1.5 times longer, mainly due to the TLS handshake overhead per connection (around 574 ms) and the need to upload full audio data to the cloud before processing could begin. Meanwhile, transactional services like Text-to-Speech (TTS) and Optical Character Recognition (OCR) achieved mean latencies of 1045 ms and 1888 ms respectively, when accessed directly over HTTPS, thus showing that this protocol can be used for stateless request-response interactions without WebSocket relay. This work provides a practical architectural methodology balancing real-time performance and implementation simplicity, particularly for resource-limited assistive devices, that can enable more sophisticated cloud-based AI functions.
No takes yet. Share an insight, caveat, or question.
Soomro et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: