Hiyve Components - v1.0.0
    Preparing search index...

    Interface TranscriptionMoodData

    Mood data to attach to transcription entries.

    Used with enrichTranscription() to attach real-time mood analysis results to recent transcription entries. This enables displaying sentiment indicators alongside transcribed speech.

    Connecting MoodAnalysisProvider to transcriptions:

    function App() {
    const { enrichTranscription } = useTranscription();

    const handleMoodChange = (userId: string, moodState: MoodState) => {
    // Convert emotion to sentiment
    const sentiment = moodState.emotion === 'happy' ? 'positive'
    : ['sad', 'angry', 'fearful'].includes(moodState.emotion) ? 'negative'
    : 'neutral';

    enrichTranscription(userId, {
    sentiment,
    emotion: moodState.emotion,
    engagement: moodState.engagement,
    confidence: moodState.confidence,
    });
    };

    return (
    <MoodAnalysisProvider onMoodChange={handleMoodChange}>
    <VideoRoom />
    </MoodAnalysisProvider>
    );
    }
    interface TranscriptionMoodData {
        confidence?: number;
        emotion?: string;
        engagement?: number;
        sentiment: "positive" | "negative" | "neutral";
    }
    Index

    Properties

    confidence?: number

    Confidence of the mood detection (0-1)

    emotion?: string

    Emotion string (e.g., 'happy', 'sad', 'neutral')

    engagement?: number

    Engagement level (0-1)

    sentiment: "positive" | "negative" | "neutral"

    Sentiment classification