Skip to content
VercelLogotypeVercelLogotype
LoginSign Up

AI Facts

A Next.js application that transcribes and validates speech in realtime with the AI SDK.

DeployView Demo

AI Facts

Note: LLMs can sometimes provide incorrect or outdated information. Always verify critical information through trusted sources.

This project is a Next.js application that performs real-time fact checking on spoken statements. It uses Deepgram for audio transcription and leverages OpenAI and Perplexity (via the Vercel AI Gateway) to verify the accuracy of claims.

Features

  • Real-time Audio Transcription: Captures and transcribes spoken audio using Deepgram's API
  • AI Fact Checking: Uses both OpenAI and Perplexity to cross-reference and verify statements
  • Live Results: Shows fact-checking results in real-time as statements are processed
  • Explanation of Validity: Provides detailed explanations for why statements are considered true or false

Technology Stack

  • Next.js for the frontend and API routes
  • AI SDK for interacting with LLMs
  • Vercel AI Gateway for unified access to OpenAI and Perplexity
  • Deepgram for audio transcription
  • ShadcnUI for UI components
  • Tailwind CSS for styling

How It Works

  1. Speak into microphone
  2. Deepgram processes the audio stream in real-time and returns transcribed text
  3. The transcribed text is analyzed for distinct statements ('?!.')
  4. Each statement is routed through the AI Gateway to OpenAI and Perplexity for fact checking
  5. The verification status and explanation are displayed to the user

Getting Started

To get the project up and running, follow these steps:

  1. Install dependencies:

    npm install
  2. Copy the example environment file:

    cp .env.example .env
  3. Add your API keys to the .env file:

    AI_GATEWAY_API_KEY=your_api_key_here
    DEEPGRAM_API_KEY=your_api_key_here

    You can create an AI Gateway API key from the Vercel dashboard. When deployed on Vercel, authentication happens automatically via OIDC and AI_GATEWAY_API_KEY is not required.

  4. Start the development server:

    npm run dev

Your project should now be running on http://localhost:3000.

Deployment

The project is set up for one-click deployment on Vercel. Use the "Deploy with Vercel" button above to create your own instance of the application.

Learn More

To learn more about the technologies used in this project, check out the following resources:

  • Next.js Documentation
  • AI SDK
  • Vercel AI Gateway
  • Deepgram
  • ShadcnUI
  • Tailwind CSS
GitHub
Ownervercel-labs
Repositoryai-facts
Use Cases
AI
Stack
Next.js
Tailwind

Related Templates

Chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
Chatbot thumbnail

Dynamic Model Usage with AI SDK

A chatbot that allows you to dynamically set the LLM using Vercel AI SDK with Feature Flags and Edge Config
Dynamic Model Usage with AI SDK thumbnail

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • eveNew
  • ConnectNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Agent Skills
  • Next.js
  • Domains
  • v0

Frameworks

  • eveNew
  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve
Core Platform
  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve

Core Platform

  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD

Tools

  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Resources

Learn

  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce

Explore

  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
Enterprise
Pricing
Sign UpLog In
Contact
DeployView Demo

Loading status…

Select a display theme: