Skip to content

How to restart live transcription listener after stopping? [Node SDK] #60

Closed Answered by briancbarrow
andrewreece asked this question in General help
Discussion options

You must be logged in to vote

@andrewreece Sorry for the delay. I ended up going to @BrianHillis-DG for another set of eyes on it. This is the solution he came up with.

Server side:

// import * as dotenv from "dotenv";
// dotenv.config({ path: "~/.env" });
// console.log("process", process.env.DEEPGRAM_API_KEY);
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

import express from "express";
import { createServer } from "http";
import { Server } from "socket.io";

const app = express();
app.use(express.static("public/"));
app.get("/", function (req, res) {
  res.sendFile(__dirname + "/index.html");
});
const ht…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@andrewreece
Comment options

Comment options

You must be logged in to vote
3 replies
@andrewreece
Comment options

@andrewreece
Comment options

@BekahHW
Comment options

Answer selected by BekahHW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants