Objective
Enable searching podcast episodes by their transcribed content. This allows listeners to find episodes discussing specific topics, even when the topic isn't in the title.
Step 1: Create Podcast Episodes Table
Create a table for podcast episodes with transcripts.
CREATE TABLE searchable_podcasts (
id INTEGER PRIMARY KEY,
show_name VARCHAR(255) NOT NULL,
episode_number INTEGER,
title VARCHAR(255) NOT NULL,
audio_file AUDIO(MP3),
duration_seconds INTEGER,
publish_date DATE,
transcript TEXT,
transcript_summary TEXT,
topics TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Step 2: Insert Sample Podcast Data
Add sample podcast episodes with transcripts.
INSERT INTO searchable_podcasts (id, show_name, episode_number, title, duration_seconds, publish_date, transcript, topics) VALUES
(1, 'Tech Today', 101, 'The Rise of AI Assistants',
2400, '2024-01-15',
'Today we discuss artificial intelligence and how AI assistants are changing the workplace. Machine learning models are becoming more sophisticated. Companies are investing heavily in natural language processing. The future of work will be transformed by these technologies.',
'AI, machine learning, workplace, NLP'),
(2, 'Tech Today', 102, 'Cloud Computing Trends',
2700, '2024-01-22',
'Cloud infrastructure continues to evolve. Amazon Web Services and Microsoft Azure dominate the market. Kubernetes has become the standard for container orchestration. Serverless computing is gaining popularity for its cost efficiency.',
'cloud, AWS, Azure, Kubernetes, serverless'),
(3, 'Business Hour', 50, 'Startup Funding Strategies',
1800, '2024-01-10',
'Raising capital for your startup requires careful planning. Venture capital firms look for scalable business models. Angel investors often provide early stage funding. Crowdfunding platforms have opened new opportunities for entrepreneurs.',
'startup, funding, venture capital, angel investors'),
(4, 'Business Hour', 51, 'Remote Work Best Practices',
2100, '2024-01-17',
'Managing remote teams effectively requires clear communication. Video conferencing tools like Zoom have become essential. Asynchronous communication helps global teams collaborate. Work life balance is crucial for remote employee productivity.',
'remote work, teams, communication, productivity'),
(5, 'Health Talk', 25, 'Nutrition and Mental Health',
1500, '2024-01-12',
'Diet affects mental well being more than many realize. Omega three fatty acids support brain function. Gut health is linked to mood and cognitive performance. Mediterranean diet has shown positive effects on mental health.',
'nutrition, mental health, diet, brain'),
(6, 'Tech Today', 103, 'Cybersecurity Essentials',
2200, '2024-01-29',
'Protecting your digital assets requires multiple layers of security. Two factor authentication should be mandatory. Phishing attacks remain the most common threat. Regular security audits help identify vulnerabilities before attackers do.',
'security, authentication, phishing, cyber');
Step 3: Search by Topic Keywords
Find episodes discussing specific topics.
SELECT
show_name,
title,
episode_number,
publish_date,
topics
FROM searchable_podcasts
WHERE transcript LIKE '%artificial intelligence%'
OR transcript LIKE '%AI%'
OR transcript LIKE '%machine learning%'
ORDER BY publish_date DESC;
Step 4: Full-Text Topic Search
Search transcripts for business topics.
SELECT
show_name,
title,
duration_seconds / 60 as duration_minutes,
topics
FROM searchable_podcasts
WHERE transcript LIKE '%startup%'
OR transcript LIKE '%funding%'
OR transcript LIKE '%venture capital%'
ORDER BY publish_date DESC;
Step 5: Cross-Show Search
Find content across all shows.
SELECT
show_name,
title,
episode_number,
topics,
'Match found' as status
FROM searchable_podcasts
WHERE transcript LIKE '%communication%'
ORDER BY show_name, episode_number;