Skip to content

Instantly share code, notes, and snippets.

@smashah
smashah / remove_silence.ts
Last active June 3, 2024 08:24
A simple way to remove silences below a certain threshold in an audio file [NODEJS/TS]
//add this to your package.json
// "audio-buffer-utils": "^5.1.2",
// "audio-decode": "^1.4.0",
// "audiobuffer-to-wav": "^1.0.0",
// "node-lame": "^1.2.0",
// "ogg.js": "^0.1.0",
// "opus.js": "^0.1.1",
const fs = require('fs');
@bnsngltn
bnsngltn / context.ts
Last active July 14, 2024 06:16
TS-Rest+Next Auth
import type { NextApiRequest, NextApiResponse } from "next";
import type {
AppRoute,
ServerInferRequest,
ServerInferResponses,
} from "@ts-rest/core";
import { getServerSession } from "next-auth";
// This is your
import { authOptions} from './authOptions'