CoolFace
Apppublic

sahana-dev/FluencyFlow

sourceHugging Facemitupdated 5mo agoView on Hugging Face
1likes
App README

title: FluencyFlow emoji: πŸ—£οΈ colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 tags:

  • β€”openenv
  • β€”healthcare
  • β€”rl-environment ---

πŸ—£οΈ FluencyFlow: The Clinical Speech-AI Environment

"Traditional AI is great at logic, but mid at empathy. We're fixing that."

FluencyFlow is a real-world Reinforcement Learning environment built for the OpenEnv 1.0 spec. It simulates the complex physiological and psychological feedback loops of individuals who stutter, allowing AI agents to learn how to be high-EQ speech coaches.


🧠 The Problem: The "Anxiety-Block" Loop

Most speech-to-text or coaching AIs assume a linear flow of speech. In the real world, stuttering is non-linear. Anxiety increases physical tension, which leads to speech blocks, which increases anxiety.

FluencyFlow models this "Negative Feedback Loop" using:

  • β€”Non-linear Stress Triggers: Cognitive load increases as the session progresses.
  • β€”Multimodal Observations: Agents see more than just textβ€”they receive tension maps, facial micro-expression data, and WPM (Words Per Minute) flux.
  • β€”Physiological Trade-offs: Taking a breath reduces anxiety but increases "fatigue," forcing the agent to find the optimal coaching balance.

πŸš€ Environment Specs

Observation Space (Multimodal)

FeatureTypeDescription
speech_statusStringFLUENT, BLOCK, REPETITION, PROLONGATION
anxiety_levelFloat0.0 (Chill) to 1.0 (Panic)
facial_mapList[Float]5-point micro-expression tension data
cognitive_loadFloatInternal processing fatigue of the speaker

Action Space

  • β€”PROMPT_BREATH: Reduces anxiety, slightly increases fatigue.
  • β€”GIVE_FEEDBACK: Boosts progress but may increase tension in "Hard" tasks.
  • β€”ADJUST_AUDIENCE: Changes audience mood to be more supportive.
  • β€”WAIT: Passive listening to allow fatigue recovery.

πŸ“ˆ Tasks & Difficulty

  1. 1.Easy_Intro (Safe Space): Low baseline anxiety. High success rate.
  2. 2.Med_Interview (The Stake): Moderate anxiety with a "Distracted" audience.
  3. 3.Hard_Keynote (Main Stage): High baseline anxiety. Frequent blocks. Requires perfect timing of "Breathing" and "Waiting."

πŸ› οΈ Setup & Usage

Local Development

  1. 1.Clone the repo.
  2. 2.Install dependencies: pip install -r requirements.txt
  3. 3.Start the server: python main.py

Running the Baseline Agent

bash
export API_BASE_URL="http://localhost:7860"
export MODEL_NAME="gpt-3.5-turbo"
export HF_TOKEN="your_token_here"
python inference.py