Skip to content

Instantly share code, notes, and snippets.

View foyzulkarim's full-sized avatar
🚀
building awesome stuffs

Foyzul Karim foyzulkarim

🚀
building awesome stuffs
View GitHub Profile
@foyzulkarim
foyzulkarim / usages.js
Created March 3, 2024 12:10
Simplify Express.js Validation: Sync Joi and Mongoose Schemas
const viewModelProps = {
title: { type: String, isRequired: true, minLength: 5, unique: true, index: true },
category: { type: String, isRequired: true },
}
// in mongoose
const videoSchema = new mongoose.Schema({
...generateSchema(true, viewModelProps),
duration: {
type: Number,
@foyzulkarim
foyzulkarim / readme.md
Last active February 5, 2025 05:05
# Text-to-Speech Pipeline with Kokoro TTS A Python script that converts text into natural-sounding speech using the Kokoro TTS engine. The script processes a transcript file, generates speech segments, and merges them into a single audio file. ## Features: - Reads text from a transcript file - Generates speech segments with customizable voice an…

Text-to-Speech Pipeline with Kokoro TTS

A Python script that converts text into natural-sounding speech using the Kokoro TTS engine. The script processes a transcript file, generates speech segments, and merges them into a single audio file.

Features:

  • Reads text from a transcript file
  • Generates speech segments with customizable voice and speed settings
  • Saves individual audio segments and their corresponding text
  • Merges all audio segments into a single WAV file using FFmpeg
  • Organizes output in timestamped directories
@foyzulkarim
foyzulkarim / timezone-finder.js
Created February 10, 2025 03:05
This file contains a list of timezones and their corresponding cities. It also includes functions to get the GMT offset and find the closest timezone based on a target hour.
/**
* This file contains a list of timezones and their corresponding cities.
* It also includes functions to get the GMT offset and find the closest timezone based on a target hour.
*/
// Define 24 hour timezones and their cities
const timezones = [
// Americas (West to East)
{ city: "Honolulu", timezone: "Pacific/Honolulu", gmt: "GMT-10" },
{ city: "Anchorage", timezone: "America/Anchorage", gmt: "GMT-9" },
@foyzulkarim
foyzulkarim / mcp.json
Created July 20, 2025 06:13
mcpServers Configuration for Model Context Protocol Runners
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {},
"disabled": false,
"autoApprove": []
},
"filesystem": {