Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

674 B
Raw Blame
package voice

import (
	"context"
	"time"

	"github.com/simplexai-labs/linger/apps/teamhub/internal/voicelive"
)

// VoiceLiveEventsHeartbeat keeps the stream open through proxies and is how
// often the stream checks that the call is still on.
const VoiceLiveEventsHeartbeat = 15 * time.Second

// LiveReplyRoom resolves the Room of a live VoiceSession that can still take
// replies; it reports voicelive.ErrNotFound once the call ended.
func (s *Service) LiveReplyRoom(ctx context.Context, voiceSessionID string) (string, error) {
	session, err := voicelive.ReplySession(ctx, s.queries, voiceSessionID)
	if err != nil {
		return "", err
	}
	return session.RoomID, nil
}