top of page

Automating Interviews for Qualitative Research at Scale: A Tutorial

Writer's picture: Lille MyLille My

Updated: Dec 12, 2024

Automating interview processes has the potential to transform the way we gather qualitative data, particularly when dealing with large-scale studies. In this tutorial, I will explore how emerging tools can support automating the interview process, allowing researchers to efficiently collect user feedback and derive insights. This discussion will feature two distinct tools that are still in their early developmental stages and require careful implementation.



The first one tool integrates voice interaction, providing an opportunity to enhance the interview process by enabling real-time verbal communication with participants. This system, referred to as the Automated Interview AI project on GitHub, leverages Twilio Voice and OpenAI's Realtime API to enable AI-facilitated conversations over the phone. It allows researchers to initiate a phone call with participants, during which the AI can conduct an interview using both pre-defined and dynamic questions. This tool enables a natural conversational flow by establishing a bi-directional connection that allows the AI to both listen and respond to participant input in real time.

The technical setup for the Interview AI system involves several key steps, including configuring a Twilio account, purchasing a phone number with voice capabilities, and setting up a tunneling solution like ngrok to expose the local server for development and testing. The AI conversation flows through a Python-based server, which routes participant audio to OpenAI's Realtime API, allowing for real-time interaction. Developers must configure the application properly, updating environment settings and routing phone calls through ngrok to ensure that the server is reachable by Twilio. While this approach allows for direct communication with participants, it is essential to acknowledge that this setup remains highly experimental and necessitates technical expertise for implementation.


Step-by-Step Process for Setting Up the Speech Assistant Project:

  1. Set Up Twilio Account: Create a Twilio account and purchase a phone number with voice capabilities (This is not an ad for Twilio :-D). This is necessary for enabling voice interaction with participants.

  2. Install ngrok: Download and install ngrok or any other tunneling solution to expose the local server to the internet. This allows Twilio to access your local development server.

  3. Set Up Python Environment: Install Python 3.9+ and create a virtual environment for the project to avoid conflicts with other packages.

  4. Install Required Packages: Use the command pip install -r requirements.txt to install the necessary dependencies for the project.

  5. Configure Twilio Number: In the Twilio Console, go to Phone Numbers > Manage > Active Numbers and point your purchased number to the ngrok URL followed by /incoming-call.

  6. Update Environment Settings: Create or update the .env file with your OpenAI API key and other necessary credentials. This step ensures the AI is properly authenticated.

  7. Run ngrok: Open a terminal and run ngrok http 5050 to create a public URL for your local server. This URL is needed for configuring Twilio to connect with your server.

  8. Configurate the system: Adapt your prompt in main.py to customize your interview question.

SYSTEM_MESSAGE = (
    "You are a helpful and bubbly AI researcher "
    "You want to understand how people's opinion about using generative AI in research "
    "You will ask questions based on their answers "
    "You want to ask very in depth questions to capture people's opinion"
)
  1. Run the Python Server: Start the development server by running python main.py. This server handles incoming calls and interacts with the AI in real time.

  2. Test the System: Call the Twilio phone number to test the setup. The AI should be able to answer the call and conduct an interview based on your predefined prompts.

  3. Concert the raw recording to wmv files: run convert.py file in your terminal to convert the raw recording to wmv files.


Twilio provides a function to record calls, but I do not recommend using it as the recordings are stored in the cloud, which can pose risks for sensitive interviews and may not comply with GDPR requirements. Instead, I added a code to the original Python script (main.py) to record calls locally on your PC. The recorded file is raw recording. You may use convert.py to convert the files. We have hosted a version in our server now. Try it out by calling +1 619 356 2184.



The second tool is an automated interview system developed by us. MimiTalk is an AI-driven platform designed to enhance the interview process by automating qualitative data collection. Developed by GAI for Research, it offers a customizable AI interviewer that facilitates seamless interviews tailored to specific research requirements. Users can create personalized interview outlines, ensuring the AI interviewer aligns with their unique needs. The platform enables researchers to download both interview recordings and conversation transcripts, providing comprehensive materials for performance evaluation.

The operational workflow of MimiTalk involves three primary steps:

  1. Project Creation: Researchers set up their interview projects and customize the AI interviewer to meet their specific objectives.

  2. Distribution of Interview Links: A unique interview link is generated and shared with research participants, allowing them to complete the interview at their convenience.

  3. Result Analysis: Researchers can download the interview transcripts and participant data for thorough analysis.

This structured approach streamlines the interview process, making it more efficient and adaptable to various research contexts. This system is now at the alpha testing period. We only test it at a small scale.





Comments


This initiative is supported by the following organizations:

  • Twitter
  • LinkedIn
  • YouTube
logo_edited.png
bottom of page