This shows you the differences between two versions of the page.
| wiki:ai:lie-detector_application [2025/06/17 17:02] – created mcarver | wiki:ai:lie-detector_application [2025/06/18 13:29] (current) – [Order of Events (Request Processing Flow)] mcarver | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| ===== Order of Events (Request Processing Flow) ===== | ===== Order of Events (Request Processing Flow) ===== | ||
| - | - **User Submits Audio File** | + | 1. |
| * User uploads a .wav file via the web interface (''/'' | * User uploads a .wav file via the web interface (''/'' | ||
| * File is saved locally as '' | * File is saved locally as '' | ||
| | | ||
| - | - **Speech-to-Text Transcription** | + | 2. |
| * Azure Speech SDK is configured using credentials from Azure Key Vault. | * Azure Speech SDK is configured using credentials from Azure Key Vault. | ||
| * The file is transcribed using continuous speech recognition. | * The file is transcribed using continuous speech recognition. | ||
| Line 30: | Line 30: | ||
| * If the transcript is empty, an error is logged, and the user is notified. | * If the transcript is empty, an error is logged, and the user is notified. | ||
| | | ||
| - | - **Sentiment Analysis** | + | 3. |
| * The transcript is passed to Azure Language Service (Text Analytics API). | * The transcript is passed to Azure Language Service (Text Analytics API). | ||
| * The API returns the sentiment (positive, neutral, or negative) and associated confidence scores. | * The API returns the sentiment (positive, neutral, or negative) and associated confidence scores. | ||
| * A telemetry event is logged with the sentiment analysis results. | * A telemetry event is logged with the sentiment analysis results. | ||
| | | ||
| - | - **Lie Detection via GPT-4.1** | + | 4. |
| * The transcript is sent to a deployed GPT-4.1 model via the Azure OpenAI API. | * The transcript is sent to a deployed GPT-4.1 model via the Azure OpenAI API. | ||
| * A structured prompt instructs the model to determine whether the statement is truthful or deceptive. | * A structured prompt instructs the model to determine whether the statement is truthful or deceptive. | ||
| * The response is parsed, logged, and returned to the front end. | * The response is parsed, logged, and returned to the front end. | ||
| | | ||
| - | - **Rendering the Result** | + | 5. |
| * The final HTML page displays: | * The final HTML page displays: | ||
| - The transcribed statement | - The transcribed statement | ||