A Hybrid WebSocket–HTTP Architecture for Low-Latency Cloud AI Integration in Assistive Communication Systems

Authors

Keywords:

Assistive Technology, Cloud AI Integration, Edge-Cloud System, WebSocket Communication, Embedded System

Abstract

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.

Author Biographies

Kehkashan Asma Memon, Mehran University of Engineering and Technology, Jamshoro

Assistant Professor, Department of Electronics Engineering

Saba Baloch, Mehran University of Engineering and Technology, Jamshoro

Assistant Professor, Department of Electronics Engineering.

References

“A Survey: Embedded Systems Supporting By Different Operating Systems.” Accessed: Jun. 06, 2026. [Online]. Available: https://www.researchgate.net/publication/303280521_A_Survey_Embedded_Systems_Supporting_By_Different_Operating_Systems

R. Malviya and S. Rajput, “AI-Driven Innovations in Assistive Technology for People with Disabilities,” pp. 61–77, 2025, doi: 10.1007/978-981-96-6069-8_4.

“Computer-mediated discourse analysis: an approach to researching online communities.” Accessed: Jun. 06, 2026. [Online]. Available: https://www.researchgate.net/publication/285786435_Computer-mediated_discourse_analysis_an_approach_to_researching_online_communities

Antje S. Meyer, “Timing in Conversation,” J. Cogn., 2023, [Online]. Available: https://journalofcognition.org/articles/10.5334/joc.268

Julien Mineraud, Oleksiy Mazhelis, “A gap analysis of Internet-of-Things platforms,” Comput. Commun., vol. 89–90, 2016, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0140366416300731

E. Dinçer and Z. H. Kilimci, “Real-time and offline large language models on edge devices: a systematic review,” PeerJ Comput. Sci., vol. 12, 2026, doi: 10.7717/PEERJ-CS.3769/.

Nisha Saini, Jitender Kumar, “A PRISMA-Based Systematic Review of Cloud- Edge Orchestration Using the MAPE-K Framework,” Int. J. Electr. Electron. Eng. Telecommun., vol. 14, no. 3, pp. 130–146, 2025, doi: 10.18178/ijeetc.14.3.130-146.

J. Liu et al., “Edge-Cloud Collaborative Computing on Distributed Intelligence and Model Optimization: A Survey,” Aug. 2025, doi: 10.1109/COMST.2026.3669216.

N. Mitrovic, M. Dordevic, S. Veljkovic, and D. Dankovic, “Implementation of WebSockets in ESP32 based IoT Systems,” 2021 15th Int. Conf. Adv. Technol. Syst. Serv. Telecommun. TELSIKS 2021 - Proc., pp. 261–264, 2021, doi: 10.1109/TELSIKS52058.2021.9606244.

“RFC 6455 - The WebSocket Protocol.” Accessed: Jun. 06, 2026. [Online]. Available: https://datatracker.ietf.org/doc/html/rfc6455

M. Kavis, “Architecting the Cloud: Design Decisions for Cloud Computing Service Models (SaaS, PaaS, AND IaaS),” Archit. Cloud Des. Decis. Cloud Comput. Serv. Model. (SaaS, PaaS, IaaS), pp. 1–199, Jan. 2014, doi: 10.1002/9781118691779.

Mohd Tamizan Abu Bakar, “Latency Issues in Internet of Things: A Review of Literature and Solution,” Int. J. Adv. Trends Comput. Sci. Eng., vol. 9, pp. 83–91, 2020, doi: 10.30534/ijatcse/2020/1291.32020.

“High Performance Browser Networking (O’Reilly).” Accessed: Jun. 06, 2026. [Online]. Available: https://hpbn.co/

Dora Kreković, Petar Krivić, “Reducing communication overhead in the IoT–edge–cloud continuum: A survey on protocols and data reduction strategies,” Internet of Things, vol. 31, p. 101553, 2025, doi: https://doi.org/10.1016/j.iot.2025.101553.

Z. Shelby, K. Hartke, and C. Bormann, “The Constrained Application Protocol (CoAP),” Rfc 7252, p. 112, 2014, [Online]. Available: https://www.rfc-editor.org/rfc/pdfrfc/rfc7252.txt.pdf

Amirhossein Farahzadi, Pooyan Shams, “Middleware technologies for cloud of things: a survey,” Digit. Commun. Networks, vol. 4, no. 3, pp. 176–188, 2018, doi: https://doi.org/10.1016/j.dcan.2017.04.005.

M. A. Razzaque, M. Milojevic-Jevric, A. Palade, and S. Cla, “Middleware for internet of things: A survey,” IEEE Internet Things J., vol. 3, no. 1, pp. 70–95, Feb. 2016, doi: 10.1109/JIOT.2015.2498900.

A. S. M. Kayes et al., “A survey of context-aware access control mechanisms for cloud and fog networks: Taxonomy and open research issues,” Sensors (Switzerland), vol. 20, no. 9, May 2020, doi: 10.3390/S20092464.

Mariana Arroyo Chavez, Molly Feanny, “How Users Experience Closed Captions on Live Television: Quality Metrics Remain a Challenge,” Conf. Hum. Factors Comput. Syst. - Proc., pp. 1–6, 2024, [Online]. Available: https://dl.acm.org/doi/10.1145/3613904.3641988

Raja S. Kushalnagar, Walter S. Lasecki, “Accessibility Evaluation of Classroom Captions,” ACM Trans. Access. Comput., vol. 5, no. 3, pp. 1–24, 2014, [Online]. Available: https://dl.acm.org/doi/abs/10.1145/2543578

Stefano Di Leo, Luca De Cicco, “Real-Time Speech-to-Text on Edge: A Prototype System for Ultra-Low Latency Communication with AI-Powered NLP,” Information, vol. 16, no. 8, p. 685, 2025, doi: https://doi.org/10.3390/info16080685.

Z. Zhou, X. Chen, E. Li, L. Zeng, K. Luo and J. Zhang, “Edge Intelligence: Paving the Last Mile of Artificial Intelligence With Edge Computing,” Proc. IEEE, vol. 107, no. 8, pp. 1738–1762, 2019, doi: 10.1109/JPROC.2019.2918951.

Umar Islam, Mohammed Naif Alatawi, Ali Alqazzaz, Sulaiman Alamro, Babar Shah & Fernando Moreira, “A hybrid fog-edge computing architecture for real-time health monitoring in IoMT systems with optimized latency and threat resilience,” Sci. Rep., 2025, [Online]. Available: https://www.nature.com/articles/s41598-025-09696-3

Abozariba, Haitham Mahmoud & Raouf, “A systematic review on WebRTC for potential applications and challenges beyond audio video streaming,” Multimed. Tools Appl., vol. 84, pp. 2909–2946, 2025, [Online]. Available: https://link.springer.com/article/10.1007/s11042-024-20448-9

Downloads

Published

2026-06-11

How to Cite

Soomro, A., Khan, A. Y., Bhave Sagar, Memon, K. A., Baloch, S., & Khan, B. (2026). A Hybrid WebSocket–HTTP Architecture for Low-Latency Cloud AI Integration in Assistive Communication Systems. International Journal of Innovations in Science & Technology, 8(3), 1192–1206. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/1910