Introduction
Smart speakers like the Amazon Echo have become ubiquitous in modern homes, yet they remain largely inaccessible to researchers as systematic data collection tools. The ESCAPE (Echo SCraper and ClAssifier of PErsons) framework is an open-source tool designed to bridge this gap. By automating the extraction of interaction data and performing high-accuracy speaker recognition, ESCAPE enables longitudinal, non-invasive monitoring of patients in their own environments, offering significant potential for studying neurodegenerative conditions like Alzheimer’s disease.
The Challenge of Smart Speaker Data
While Amazon stores every interaction—including audio clips and transcripts—there is no native research API for bulk data retrieval. Furthermore, in multi-person households, the device does not inherently distinguish between different speakers in its logs. For clinicians looking for digital biomarkers, such as changes in speech patterns or repetitive questioning, the inability to attribute data to a specific participant renders the device a "walled garden."
The ESCAPE Framework
To transform the Echo from a consumer toy into a clinical tool, ESCAPE addresses two primary technical hurdles: data mining and speaker attribution.
Data Mining (The Scraper)
Since no official API exists, the authors developed a web scraper that utilizes an HTTP cookie from a logged-in Alexa web session. This allows the tool to automatically download all associated audio recordings, transcripts, and metadata.
Speaker Recognition (The Classifier)
Identifying speakers manually is labor-intensive. ESCAPE utilizes a multi-stage machine learning pipeline to automate this process:
- Feature Extraction: Audio is converted into Mel-Frequency Cepstral Coefficients (MFCCs).
- Smart Labeling: Using Kullback-Leibler (KL) divergence, the system identifies a diverse subset of recordings for manual labeling, minimizing human effort.
- Modeling: Hidden Markov Models (HMMs) are inferred for each file to create a similarity matrix.
- Classification: A Ridge Regression Classifier is trained to distinguish between residents.
Data and Experimental Setup
The tool was validated using a real-world dataset collected over several months from a household with two residents (one male, one female). The setup included an Amazon Echo and an Echo Dot, resulting in 2,902 total interactions. Of these, 1,807 contained both audio and transcribed text, providing a robust baseline for testing the classifier.
Key Results and Performance
The ESCAPE framework demonstrated remarkable efficiency and accuracy. A key insight was that truncating audio to the first 1.5 seconds—the typical duration of the "Alexa" wake word—was sufficient for high-accuracy recognition. This phonetic anchor simplifies the classification task significantly.
In terms of performance, the Ridge Regression model achieved near-perfect results. In 100 random training/test splits, the model reached 100% accuracy on the training set and maintained 100% accuracy in the majority of test folds. Additionally, the system revealed that 84.5% of interactions were successfully understood by Alexa, while a significant portion of the remaining data consisted of "false triggers" where the device mistakenly heard the wake word.
Conclusion and Future Directions
ESCAPE provides a scalable, semi-supervised method for turning commercial IoT devices into research instruments. While currently tested on a two-person household of different genders, future work will focus on more complex environments with same-gender speakers. The authors are currently deploying ESCAPE to evaluate its utility for patients with Posterior Cortical Atrophy (PCA), aiming to determine if these naturalistic interactions can effectively track disease progression over time.
Summary updated