This PR implements the client-side adjustments needed to utilise the new conversational tempo feature from the Say, Pi API. It incorporates the tempo into the delay calculation before submitting user prompts to the chatbot, providing a more natural conversational pace.
Changes
Updated submissionDelay function to consider the tempo parameter received from the API.
Adjusted the delay calculation logic to reduce the waiting time for faster speakers and increase it for slower speakers.
Added a calculateDelay function for testability and clarity.
Included unit tests for the new delay calculation logic.
Rationale
The client-side update complements the API's conversational tempo feature by ensuring that the timing of the chatbot's responses feels natural for the user. It creates a more dynamic and responsive user experience, tailored to the speech patterns of each individual user.
Testing
New unit tests have been written for the calculateDelay function to ensure its correctness.
Manual testing has been conducted to verify that the chatbot's response timing feels intuitive across different speaking tempos.
Summary
This PR implements the client-side adjustments needed to utilise the new conversational tempo feature from the Say, Pi API. It incorporates the tempo into the delay calculation before submitting user prompts to the chatbot, providing a more natural conversational pace.
Changes
submissionDelay
function to consider thetempo
parameter received from the API.calculateDelay
function for testability and clarity.Rationale
The client-side update complements the API's conversational tempo feature by ensuring that the timing of the chatbot's responses feels natural for the user. It creates a more dynamic and responsive user experience, tailored to the speech patterns of each individual user.
Testing
calculateDelay
function to ensure its correctness.