## Face-to-Face Translation

### Feature Introduction
The face-to-face translation feature supports real-time collection of both parties' conversation audio through smart earphones, cards, and other recording devices, transmitting the audio data to the app. The system uses speech recognition and AI translation technologies to transcribe speech into text and enable multilingual translation. Recognition and translation results can be instantly fed back in text or voice form, helping users achieve efficient and natural communication in cross-language scenarios.

<img alt="Face-to-Face Translation" src="https://images.tuyacn.com/rms-static/c461af90-7e38-11f0-9fb9-e1834df84344-1755744272649.png?tyName=f2f.png" width="300" height="400"></br>

### Interaction Flow

```mermaid
sequenceDiagram
    %% Panel initiates face-to-face recording
    rect rgb(191, 223, 255)
    Panel->>App: Initiate recording
    end

    %% App uploads audio stream to the cloud in real time
    rect rgb(255, 239, 191)
    App->>Cloud: Upload audio stream in real time
    end

    %% Cloud returns ASR and AI translation results, returns TTS audio stream
    rect rgb(255, 191, 191)
    Cloud-->>App: Return ASR results, AI translation results, TTS audio stream
    end

    %% App pushes ASR and translation results to the panel
    rect rgb(191, 255, 191)
    App-->>Panel: Push ASR and translation results
    end

    %% App pushes TTS audio stream to earphones, earphones play audio stream
    rect rgb(191, 255, 255)
    App-->>Earphones: Push TTS audio stream
    Earphones->>User: Play audio stream
    end

    %% Panel listens for ASR and translation and renders
    rect rgb(223, 191, 255)
    Panel->>Panel: Render ASR and translation results to different areas based on current speaker
    end

```
