CINXE.COM
Transcribe Recorded Calls With Twilio — Deepgram | Documentation
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" href="/api/fern-docs/search/v1/key" as="fetch" crossorigin="anonymous"/><link rel="preload" href="/api/fern-docs/auth/api-key-injection" as="fetch" crossorigin="anonymous"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><title>Transcribe Recorded Calls With Twilio — Deepgram | Documentation</title><meta name="robots" content="index,follow"/><meta name="description" content="With Twilio and Deepgram you can record and transcribe your phone calls."/><meta name="theme-color" content="#1a1a1f"/><meta property="og:title" content="Transcribe Recorded Calls With Twilio — Deepgram | Documentation"/><meta property="og:description" content="With Twilio and Deepgram you can record and transcribe your phone calls."/><meta property="og:url" content="https://developers.deepgram.com/docs/transcribe-recorded-calls-with-twilio"/><meta property="og:site_name" content="Deepgram | Documentation"/><link rel="canonical" href="https://developers.deepgram.com/docs/transcribe-recorded-calls-with-twilio"/><meta name="generator" content="buildwithfern.com"/><link rel="icon" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/favicon.ico" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Inter.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/FiraMono.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Roobert.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><script type="application/ld+json" id="jsonld-breadcrumb">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Deepgram | Documentation","item":"https://developers.deepgram.com/"},{"@type":"ListItem","position":2,"name":"Guides","item":"https://developers.deepgram.com/docs"},{"@type":"ListItem","position":3,"name":"Use Case Examples","item":"https://developers.deepgram.com/docs/use-case-examples"},{"@type":"ListItem","position":4,"name":"Transcribe Recorded Calls With Twilio","item":"https://developers.deepgram.com/docs/transcribe-recorded-calls-with-twilio"}]}</script><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/logo.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="20"/><link href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" rel="stylesheet"/><script id="theme-script" data-nscript="beforeInteractive">(e=>{let t=document.documentElement;function n(e){t.classList.remove("light","dark"),t.classList.add(e),t.style.colorScheme=e}if(1===e.length)n(e[0]);else try{let t=localStorage.getItem("theme")??"system",r=e.length>0&&"system"===t?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;n(r)}catch{}})(["dark"])</script><link rel="preload" href="https://app.ferndocs.com/_next/static/css/b5ef68ada6ac4b07.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" as="style"/><link rel="stylesheet" href="https://app.ferndocs.com/_next/static/css/b5ef68ada6ac4b07.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" data-n-g=""/><link rel="preload" href="https://app.ferndocs.com/_next/static/css/80bca615e6d01b34.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" as="style"/><link rel="stylesheet" href="https://app.ferndocs.com/_next/static/css/80bca615e6d01b34.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="https://app.ferndocs.com/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script src="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/dist/output.js" type="module" defer="" data-nscript="beforeInteractive"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8494.89309af69f67ac9d.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7191.7664a652cf78e25c.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/45bb0db8.463a392675fecfb0.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/92e66809.393f81705c519a34.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/118f301d.0a7382916ef4ac18.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/52d2be3c.b954481fe5a6d824.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/f29dc6a8.0d3c3c8683df2eda.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6003.c51da136c4cdc4e2.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8950.bc07b3e1c13f1432.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5717.a121432bdbac2575.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3970.c2fe78b12d70f6c5.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/600.9e9db95b2c541679.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3551.f273dcadace15afb.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/f136264b.fe05aaa57e22d479.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4217.08fff909190d4e30.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/2729.42c77bdb2d91a65d.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/9042.326e31070d76df17.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8326.bde182ef6c372b2f.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6318.58ee0f53c459a73e.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8508.7a6ed07aa65989af.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5119.7fbcb17fea114486.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5438.9dfc11fa11c8ee42.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6770.7f324a0184155c4e.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7708.bec065f6e20bb795.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/a20b1002.4488a96695dd3fd2.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5653.ba43092f7e682928.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4471.ccd5aeba70bc8ffb.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7679.47196e74655aa33f.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4938.1396ed581cf45ffd.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/1017.33e29a306ce9b285.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3543.329adf52c784d779.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7575.924e50684a873f53.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script src="https://app.ferndocs.com/_next/static/chunks/webpack-08f362e6cd5268e7.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/framework-66d89474ad83799b.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/main-8bc5002bdb8afd00.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/pages/_app-817872fd2c495d6b.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/2709-cda5da4a8db8de58.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/6053-736813b84433ca4a.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/pages/static/%5Bdomain%5D/%5B%5B...slug%5D%5D-31f428dae64597dc.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/jigMgAOOAbh4GA_fJkAR-/_buildManifest.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/jigMgAOOAbh4GA_fJkAR-/_ssgManifest.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><style id="__jsx-3641366772"> :root { --typography-body-font-family: 'Inter', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif; --typography-heading-font-family: 'Roobert', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif; --typography-code-font-family: 'FiraMono', ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; --spacing-page-width: 100%; --spacing-content-width: 44rem; --spacing-content-wide-width: 66.5rem; --spacing-sidebar-width: 18rem; --spacing-header-height: 6.75rem; --spacing-header-height-padded: 5rem; --spacing-header-height-real: 4rem; --grayscale-1: var(--mauve-1); --grayscale-2: var(--mauve-2); --grayscale-3: var(--mauve-3); --grayscale-4: var(--mauve-4); --grayscale-5: var(--mauve-5); --grayscale-6: var(--mauve-6); --grayscale-7: var(--mauve-7); --grayscale-8: var(--mauve-8); --grayscale-9: var(--mauve-9); --grayscale-10: var(--mauve-10); --grayscale-11: var(--mauve-11); --grayscale-12: var(--mauve-12); --grayscale-a1: var(--mauve-a1); --grayscale-a2: var(--mauve-a2); --grayscale-a3: var(--mauve-a3); --grayscale-a4: var(--mauve-a4); --grayscale-a5: var(--mauve-a5); --grayscale-a6: var(--mauve-a6); --grayscale-a7: var(--mauve-a7); --grayscale-a8: var(--mauve-a8); --grayscale-a9: var(--mauve-a9); --grayscale-a10: var(--mauve-a10); --grayscale-a11: var(--mauve-a11); --grayscale-a12: var(--mauve-a12); --accent-1: #f7f7f9; --accent-2: #f1f3f9; --accent-3: #e8ebf7; --accent-4: #dde2f9; --accent-5: #d0d7f8; --accent-6: #c0c8f3; --accent-7: #abb5eb; --accent-8: #8f9be2; --accent-9: #7783f7; --accent-10: #6c77e9; --accent-11: #5158c3; --accent-12: #282c5f; --accent-a1: #7a3b7c04; --accent-a2: #1734c309; --accent-a3: #0926c312; --accent-a4: #0327ea1d; --accent-a5: #0126e92a; --accent-a6: #0322d93b; --accent-a7: #011ec950; --accent-a8: #011cc16d; --accent-a9: #0217f486; --accent-a10: #0214dc91; --accent-a11: #020ca8ad; --accent-a12: #010642d7; --accent-surface: #eff1f9cc; --gray-surface: #ffffffcc; --accent: 119, 131, 247; --accent-aa: 81, 96, 245; --accent-aaa: 32, 52, 243; --accent-tinted: 143, 153, 248; --background: 249, 250, 251; --accent-contrast: rgb(255, 255, 255); --bg-color-card: rgba(255, 255, 255, 0.7); --sidebar-background: transparent; --header-background: transparent; --border: var(--grayscale-a4); --border-concealed: var(--grayscale-a2); --body-text: 0, 0, 0; --body-text-inverted: 255, 255, 255; } @media (max-width: 1024px) { :root { --spacing-header-height: 6.75rem; --spacing-header-height-padded: 5rem; } } :is(.dark) { --grayscale-1: var(--gray-1); --grayscale-2: var(--gray-2); --grayscale-3: var(--gray-3); --grayscale-4: var(--gray-4); --grayscale-5: var(--gray-5); --grayscale-6: var(--gray-6); --grayscale-7: var(--gray-7); --grayscale-8: var(--gray-8); --grayscale-9: var(--gray-9); --grayscale-10: var(--gray-10); --grayscale-11: var(--gray-11); --grayscale-12: var(--gray-12); --grayscale-a1: var(--gray-a1); --grayscale-a2: var(--gray-a2); --grayscale-a3: var(--gray-a3); --grayscale-a4: var(--gray-a4); --grayscale-a5: var(--gray-a5); --grayscale-a6: var(--gray-a6); --grayscale-a7: var(--gray-a7); --grayscale-a8: var(--gray-a8); --grayscale-a9: var(--gray-a9); --grayscale-a10: var(--gray-a10); --grayscale-a11: var(--gray-a11); --grayscale-a12: var(--gray-a12); --accent-1: #050d0a; --accent-2: #0f1a15; --accent-3: #092d21; --accent-4: #003d29; --accent-5: #004b34; --accent-6: #005a40; --accent-7: #006b4d; --accent-8: #00805b; --accent-9: #a1f9d4; --accent-10: #97efca; --accent-11: #66cfa6; --accent-12: #9df5d0; --accent-a1: #00b50003; --accent-a2: #4bfb9c10; --accent-a3: #00fca124; --accent-a4: #00fc9735; --accent-a5: #00ffa543; --accent-a6: #00feac53; --accent-a7: #00fdb165; --accent-a8: #00fdb07b; --accent-a9: #a5ffd9f9; --accent-a10: #a0fed6ef; --accent-a11: #7dffcccd; --accent-a12: #a3ffd8f5; --accent-surface: color(display-p3 0.0863 0.1569 0.1255 / 0.5); --gray-surface: color(display-p3 0 0 0 / 5%); --accent: 161, 249, 212; --accent-aa: 161, 249, 212; --accent-aaa: 161, 249, 212; --accent-tinted: 185, 251, 223; --background: 11, 11, 12; --accent-contrast: rgb(11, 40, 29); --bg-color-card: rgb(26, 26, 31); --bg-color-card-solid: rgb(26, 26, 31); --sidebar-background: rgb(11, 11, 12); --header-background: rgb(26, 26, 31); --border: rgb(44, 44, 51); --border-concealed: rgb(44, 44, 51); --body-text: 255, 255, 255; --body-text-inverted: 0, 0, 0; } @font-face { font-family: 'Inter'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Inter.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: 'Roobert'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Roobert.woff2') format('woff2'); font-weight: 600 900; font-style: normal; font-display: swap; } @font-face { font-family: 'FiraMono'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/FiraMono.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; } html { background-color: #f9fafb; } html.dark { background-color: #0b0b0c; } .fern-button.filled { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; } .fern-header-tab-button[data-state=active] { color: white !important; } .fern-header-tab-button[data-state=active]:after { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; height: 2px !important; } .fern-header-tab-button { padding-left: 24px !important; padding-right: 24px !important; } @media (max-width: 1350px) { .fern-header-tab-button { padding-left: 16px !important; padding-right: 16px !important; } } @media (max-width: 1185px) { .fern-header-tab-button { padding-left: 12px !important; padding-right: 12px !important; } } @media (max-width: 1100px) { .fern-header-tab-button { padding-left: 8px !important; padding-right: 8px !important; } } .fern-mdx-link { color: #79affa !important; text-decoration: none; } .fern-mdx-link svg { color: #79affa !important; } .white .fern-card span { background: white !important; } @media (min-width: 1024px) { .fern-header-right-menu { display: none !important; } } .banner { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; } .banner p { margin-top: .25rem; margin-bottom: .25rem; } .banner h1 { margin-top: .5rem; margin-bottom: 16px; } .fern-sidebar-link-container[data-state="active"] { color: white !important; } .fern-sidebar-link-text { font-size: 16px !important; } .fern-sidebar-link-container[data-state=active] .fern-sidebar-link-indent:after { border: 0px !important; } .fern-sidebar-link-container[data-state="active"] .fern-sidebar-link { background-color: #232329 !important; } .fern-sidebar-link-container[data-state="active"] .fern-sidebar-link:after { background: linear-gradient(177.85deg, #201CFF -102.27%, #13EF95 101.45%) !important; width: 1px !important; position: absolute !important; content: "" !important; right: 0 !important; top: 0 !important; bottom: 0 !important; border-radius: 8px !important; } .fern-sidebar-link { border-radius: 0 !important; } .fern-sidebar-link-content { padding-left: 1rem !important; padding-right: 1rem !important; padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; } .fern-sidebar-content { padding-left: 0 !important; padding-right: 0 !important; } @media (min-width: 1024px) { .fern-sidebar-container:not(.fern-sidebar-fixed) { padding-left: 0rem !important; } } .fern-header-tab-button span { font-weight: 700 !important; font-size: 16px !important; line-height: 17.5px !important; letter-spacing: 2% !important; } .fern-search-bar { --tw-ring-color: #4E4E52 !important; background-color: #0B0B0C !important; } .fern-sidebar-heading-content, .fern-sidebar-link-container .font-semibold .fern-sidebar-link-text { font-weight: 700 !important; font-size: 14px !important; line-height: 17.5px !important; letter-spacing: 2% !important; color: #A1F9D4 !important; } .fern-breadcrumb-item { color: var(--grayscale-a11) !important; font-weight: 400 !important; } button[role="tab"][data-state="active"] { background-color: #1A1A1F !important; } button[role="tab"][data-state="active"]:after { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; height: 2px !important; position: absolute !important; content: "" !important; right: 0 !important; left: 0 !important; bottom: 0 !important; } button[role="tab"] { box-shadow: none !important; position: relative !important; } button[role="tab"]:hover span { background-color: #1A1A1F !important; } div[class*="callout"] { border-left-width: 2px !important; border-color: var(--tw-ring-color) !important; } .fern-search-bar, .callout-outlined, .fern-card .fern-button { border-radius: 8px !important; } .bg-tag-default-soft { background-color: #28282B !important; } .code-block-root span[style*="color: rgb(194, 195, 197);"] { --shiki-dark: #949498 !important; } .callout-outlined { background-color: #1D2A34 !important; --tw-ring-color: #149AFB !important; } .callout-outlined-warning { background-color: #342D1E !important; --tw-ring-color: #FEC84B !important; } .callout-outlined p, .callout-outlined h5, .callout-outlined-warning p, .callout-outlined-warning h5, .callout-outlined-success p, .callout-outlined-success h5, .callout-outlined-danger p, .callout-outlined-danger h5, .callout-outlined-info p, .callout-outlined-info h5, .callout-outlined-tip p, .callout-outlined-tip h5, .callout-outlined-primary p, .callout-outlined-primary h5, .callout-outlined-check p, .callout-outlined-check h5, .callout-outlined-secondary p { color: var(--grayscale-a11) !important; } div[class*="callout"] .mt-0\.5.w-4 { align-self: center !important; } span[data-badge-type="http-method"], span[data-badge-type="status-code"] { border-radius: 50px !important; } .dg-badge { margin-right: 6px !important; color: #bbbbbf !important; padding: 1px 1px !important; text-decoration: none !important; border-radius: 4px !important; background-origin: border-box !important; background-image: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%); display: flex; align-items: center; justify-content: center; width: fit-content; height: fit-content; } .dg-badge span { background-color: #1A1A1F !important; padding: 4px 12px !important; border-radius: 4px !important; display: flex; align-items: center; justify-content: center; } .dg-badge .fa-icon { background: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%); margin-right: 4px !important; } .fern-card { background-color: #0B0B0C !important; border-radius: 8px !important; } ol li { margin-top: 2rem !important; } .small .fern-card { padding-bottom: 1rem !important; padding-top: 1rem !important; } .small .fern-card .items-start { align-items: center !important; } .small .fern-card .text-base { color: #BBBBBF !important; font-weight: 600 !important; } .fern-card h3 { margin-top: 0px !important; } .fern-sidebar-tabs { padding-left: 10px !important; } .fern-sidebar-heading { padding-left: 28px !important; } .api-playground-call { width: fit-content !important; height: fit-content !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 1px !important; border-radius: 4px !important; background-image: linear-gradient(82.38deg, #ff2eea -99.24%, #4b3cff 99.26%) !important; width: 100% !important; margin-top: 1rem !important; } .api-playground-call span:first-child { display: flex !important; align-items: center !important; gap: 12px !important; background-color: #1A1A1F !important; padding: 4px !important; border-radius: 4px !important; width: 100% !important; flex-direction: row !important; } .api-playground-call p { margin: 0 !important; display: flex !important; align-items: center !important; white-space: nowrap !important; } .api-playground-call p div:first-child { display: inline-flex !important; align-items: center !important; } .api-playground-call img { width: 2.5rem !important; height: 2.5rem !important; display: inline-block !important; margin-top: 4px !important; margin-bottom: 4px !important; transform: scaleX(-1) !important; } .invert-white { filter: invert(1) !important; } .fa-icon, .card-icon { width: 2rem !important; height: 2rem !important; } .dg-badge .fa-icon { width: 1rem !important; height: 1rem !important; } .fern-header, .fern-header-tabs { border-bottom-width: 0px !important; } .fern-header-tabs-list-item span { font-family: 'Roobert' !important; } .fern-header-tabs-list, .fern-header-tabs-list-item { height: 100% !important; } .fern-sidebar-link-indent { margin-left: 20px !important; } .fern-sidebar-link-container[data-state=inactive] .fern-sidebar-link:hover { color: #FBFBFF !important; } .t-muted:is(.dark *) { color: #949498 !important; } .dark\:prose-invert:is(.dark *) { --tw-prose-headings: #FBFBFF !important; color: #E1E1E5 !important; } .fern-page-heading * { color: #FBFBFF !important; } .badge a { text-decoration: none !important; color: unset !important; } .badge svg { display: none !important; } .dep { background: #bbbbbf !important; } .dep .fa-icon { background: #bbbbbf !important; } .dep span { text-decoration: line-through !important; } .pink { background-image: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important; } .pink .fa-icon { background: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important; } #fern-header { padding-top: 3rem !important; } .fern-sidebar-container { position: sticky !important; top: 0 !important; margin-top: 10rem !important; overflow-y: auto !important; z-index: 20 !important; height: 100vh !important; } .fern-main { margin-top: calc(var(--header-offset, 0) + 3rem) !important; } .fern-endpoint-content-right .fa-icon, .fern-dropdown-item .fa-icon { width: 1rem !important; height: 1rem !important; } .fern-endpoint-content { padding-top: 3rem !important; } #fern-header { position: absolute !important; } div[id="/reference/speech-to-text-api/listen#request"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(2) { display: none !important; } div[id="/reference/speech-to-text-api/listen#request"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(1):after { content: " binary" !important; color: #949498 !important; font-size: .75rem; line-height: 1rem; font-family: 'Inter' !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); margin-left: .5rem; } #fern-header { position: absolute !important; } .fern-sidebar-fixed+.fern-main { padding-left: 0px !important; } .api-playground-call a { padding-left: 4px !important; padding-right: 4px !important; color: #79affa !important; text-decoration: none !important; } *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-inset-x-0{left:0;right:0}.tw-top-0{top:0}.tw-z-30{z-index:30}.tw-mx-auto{margin-left:auto;margin-right:auto}.tw-flex{display:flex}.tw-w-full{width:100%}.tw-max-w-\[var\(--spacing-page-width\)\]{max-width:var(--spacing-page-width)}.tw-items-center{align-items:center}.tw-justify-end{justify-content:flex-end}.tw-gap-2{gap:.5rem}.tw-gap-3{gap:.75rem}.tw-rounded-md{border-radius:.375rem}.tw-bg-\[\#232329\]{--tw-bg-opacity: 1;background-color:rgb(35 35 41 / var(--tw-bg-opacity))}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-top:.5rem;padding-bottom:.5rem}.tw-text-\[\#BBBBBF\]{--tw-text-opacity: 1;color:rgb(187 187 191 / var(--tw-text-opacity))}.tw-backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#fern-header a{font-size:16px!important;font-family:Inter,sans-serif!important}@media (min-width: 768px){.md\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1024px){.lg\:tw-px-8{padding-left:2rem;padding-right:2rem}} </style><style id="__jsx-1533687371">:root{ --header-offset: 108px}@media(max-width:1024px){:root{--header-offset:64px}}</style></head><body class="antialiased"><div id="__next"><div class="fern-background dark:from-transparent"></div><div id="fern-docs" class="fern-container fern-theme-default"><header id="fern-header" role="banner"><div class="fern-header-container width-before-scroll-bar has-background-dark" data-border="hide"><div class="clipped-background"><div class="h-screen opacity-60 dark:opacity-80 fern-background dark:from-transparent"></div></div><div class="fern-header"><nav aria-label="primary" class="fern-header-content max-w-page-width mx-auto"><div class="relative flex h-full min-w-fit flex-1 shrink-0 items-center gap-2 py-1"><div class="flex items-center gap-2"><a href="/"><div class="fern-logo-container"><img alt="Deepgram | Documentation" fetchpriority="high" loading="eager" width="176" height="25" decoding="async" data-nimg="1" class="fern-logo" style="color:transparent;aspect-ratio:7.04;height:24px;width:auto" src="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/logo.svg"/></div></a></div></div><div class="fern-header-searchbar"><button id="fern-search-button" class="fern-search-bar w-full" disabled=""><span class="search-placeholder"><svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="size-icon-md"><path d="M17 17L21 21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Search...</span></span><kbd class="keyboard-shortcut-hint">/</kbd></button></div><div class="fern-header-right-menu flex-1"><div class="lg-menu"><span class="fern-button-group"></span></div><div class="max-lg-menu"><button tabindex="0" disabled="" data-state="off" aria-disabled="true" data-selected="false" id="fern-search-button" class="max-sm:block fern-button minimal large disabled rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="!size-icon-md"><path d="M17 17L21 21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button><button tabindex="0" data-state="off" aria-disabled="false" class="fern-button minimal large rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="!size-icon-md"><path d="M3 5H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 12H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 19H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div></nav></div><nav aria-label="tabs" class="fern-header-tabs"><ul class="fern-header-tabs-list"><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/home/introduction"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Home</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/voice-agent"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Voice Agent</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/pre-recorded-audio"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Speech to Text</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/tts-rest"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Text to Speech</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/audio-intelligence"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Intelligence</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/reference/deepgram-api-overview"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">API Ref</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="active" href="/docs/make-your-first-api-request"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Guides</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/deepgram-sdks"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">SDKs</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/self-hosted-introduction"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Self-Hosted Deployments</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/security-policy"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Security</span></div></a></li></ul></nav></div></header><style> .fern-sidebar-container { border-right-width: 0px; border-left-width: 0px; } :is(.dark) .fern-sidebar-container { border-right-width: 1px; border-left-width: 1px; } </style><div class="fern-body"><nav aria-label="secondary" class="fern-sidebar-container desktop fern-sidebar-fixed"><div dir="ltr" class="fern-scroll-area flex-1" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport group/sidebar fern-sidebar-content" data-scrollbars="vertical" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><ul class="fern-sidebar-tabs lg:hidden"><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/home/introduction"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Home</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/voice-agent"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Voice Agent</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/pre-recorded-audio"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Speech to Text</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/tts-rest"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Text to Speech</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/audio-intelligence"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Intelligence</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/reference/deepgram-api-overview"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">API Ref</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="active" href="/docs/make-your-first-api-request"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Guides</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/deepgram-sdks"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">SDKs</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/self-hosted-introduction"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Self-Hosted Deployments</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/security-policy"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url("https://icons.ferndocs.com/solid/book-open.svg");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Security</span></div></a></li></ul><ul class="fern-sidebar-group"><li class="mt-6"><div class="fern-sidebar-heading"><span class="fern-sidebar-heading-content">Fundamentals</span></div><ul class="fern-sidebar-group"><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/make-your-first-api-request"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Make Your First API Request</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/authenticating"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Authenticating</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/model-metadata"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Model Metadata</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/managing-projects"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Managing Projects</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/using-multiple-projects"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Using Multiple Projects</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/working-with-roles"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Working With Roles & API Scopes</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/supported-audio-formats"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Supported Audio Formats</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/deployment-options"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Deployment Options</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/create-additional-api-keys"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Creating API Keys</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/using-the-sec-websocket-protocol"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Using the Sec-WebSocket-Protocol</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/using-logs-usage"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Logs & Usage Data</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/the-deepgram-model-improvement-partnership-program"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Model Improvement Partnership Program</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/working-with-concurrency-rate-limits"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Working With Concurrency Rate Limits</span></span></a></div></li></ul></li><li class="mt-6"><div class="fern-sidebar-heading"><span class="fern-sidebar-heading-content">Use Case Examples</span></div><ul class="fern-sidebar-group"><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/build-voice-agent-with-twilio-deepgram-openai"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Build a Voice Agent with Twilio & OpenAI & Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/calculate-talk-time-analytics"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Calculate Talk Time Analytics</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/transcribe-meetings-in-realtime"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Transcribe Meetings in Realtime</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="active"><a class="fern-sidebar-link" href="/docs/transcribe-recorded-calls-with-twilio"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Transcribe Recorded Calls With Twilio</span></span></a></div></li></ul></li><li class="mt-6"><div class="fern-sidebar-heading"><span class="fern-sidebar-heading-content">Integrations</span></div><ul class="fern-sidebar-group"><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/deepgram-with-amazon-connect"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Amazon Connect and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/using-aws-s3-presigned-urls-with-the-deepgram-api"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">AWS S3 Presigned URLs and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/genesys-with-deepgram"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Genesys and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/use-deepgram-with-dialogflow-cx"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Google Dialogflow CX and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/makecom-deepgram-integration"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Make.com and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/on-premise-twilio-integration"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Twilio and Deepgram STT</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/twilio-and-deepgram-tts"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Twilio and Deepgram TTS</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/twilio-and-deepgram-voice-agent"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Twilio and Deepgram Voice Agent</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/zapier-integration"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Zapier and Deepgram</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/integrate-deepgram-with-zoom"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Zoom and Deepgram</span></span></a></div></li></ul></li></ul></div></div></div></nav><div class="fern-main"><main class="fern-guide-layout"><aside class="fern-layout-toc"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport px-4 pb-12 pt-8 lg:pr-8" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><div class="text-grayscale-a11 m-0 mb-3 text-sm font-medium">On this page</div><ul class="toc-root not-prose" style="--height:0px;--top:0px"><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/transcribe-recorded-calls-with-twilio#before-you-begin">Before You Begin</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/transcribe-recorded-calls-with-twilio#create-a-deepgram-api-key">Create a Deepgram API Key</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/transcribe-recorded-calls-with-twilio#gather-twilio-credentials">Gather Twilio Credentials</a></li><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/transcribe-recorded-calls-with-twilio#getting-started">Getting Started</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/transcribe-recorded-calls-with-twilio#configure-the-settings">Configure the Settings</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/transcribe-recorded-calls-with-twilio#run-on-localhost">Run on localhost</a></li><li class="mb-2 last:mb-0" data-depth="2"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:24px" href="/docs/transcribe-recorded-calls-with-twilio#clone-the-repository">Clone the Repository</a></li><li class="mb-2 last:mb-0" data-depth="2"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:24px" href="/docs/transcribe-recorded-calls-with-twilio#configure-the-settings-1">Configure the Settings</a></li><li class="mb-2 last:mb-0" data-depth="2"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:24px" href="/docs/transcribe-recorded-calls-with-twilio#create-a-virtual-environment-optional">Create a Virtual Environment (optional)</a></li><li class="mb-2 last:mb-0" data-depth="2"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:24px" href="/docs/transcribe-recorded-calls-with-twilio#install-the-dependencies">Install the Dependencies</a></li><li class="mb-2 last:mb-0" data-depth="2"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:24px" href="/docs/transcribe-recorded-calls-with-twilio#start-the-server">Start the Server</a></li><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/transcribe-recorded-calls-with-twilio#code-walk-through">Code Walk-through</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/transcribe-recorded-calls-with-twilio#sending-recordings-to-the-deepgram-api">Sending Recordings to the Deepgram API</a></li></ul></div></div></div></aside><article class="fern-layout-content max-w-content-width"><header class="mb-8"><div class="space-y-1"><div><span class="fern-breadcrumb"><a class="fern-breadcrumb-item" href="/docs/build-voice-agent-with-twilio-deepgram-openai">Use Case Examples</a></span></div><h1 class="fern-page-heading"><p>Transcribe Recorded Calls With Twilio</p></h1></div><div class="prose-p:t-muted mt-2 leading-7"><p>With Twilio and Deepgram you can record and transcribe your phone calls.</p></div></header><div class="prose dark:prose-invert prose-h1:mt-[1.5em] first:prose-h1:mt-0 max-w-full break-words"><p>The wealth of knowledge in the conversations that happen during your sales and support calls can be left untapped without automatic transcription. Using Deepgram’s Transcription API, you can gather the data you need to make informed decisions about your organization’s interactions.</p> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="text-intent-default size-icon-md"><path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-default"><h5 class="leading-snug"></h5><p>The demo code in this guide uses an older version of our Node SDK. A new version of our SDK is now available. <a class="fern-mdx-link" href="/docs/js-sdk-v2-to-v3-migration-guide">A migration guide is available</a>.</p></div></div></div></div> <h2 id="before-you-begin" data-state="closed">Before You Begin</h2> <p>The example provided is written in Node.js, and you can find the code on <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://github.com/deepgram-devs/video-chat">GitHub<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>.</p> <p>Before you run the code, you’ll need to do a few things:</p> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="text-intent-default size-icon-md"><path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-default"><h5 class="leading-snug"></h5><p>Before you can use Deepgram, you’ll need to <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://console.deepgram.com/signup?jump=keys">create a Deepgram account<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>. Signup is free and includes <strong class="font-semibold">$200</strong> in free credit and access to all of Deepgram’s features!</p></div></div></div></div> <h3 id="create-a-deepgram-api-key" data-state="closed">Create a Deepgram API Key</h3> <p>To access Deepgram’s API, you’ll need to <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://console.deepgram.com/signup?jump=keys">create a Deepgram API Key<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>. Make note of your API Key; you will need it later.</p> <h3 id="gather-twilio-credentials" data-state="closed">Gather Twilio Credentials</h3> <p>This application uses Twilio Voice to start a phone call that will be recorded and transcribed. Before you can use Twilio products, you’ll need to <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://twilio.com/">sign up for a Twilio account<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>.</p> <p>To use the sample application, you’ll need a Twilio Account SID and Twilio Auth Token. These can both be found within your Twilio account dashboard.</p> <h2 id="getting-started" data-state="closed">Getting Started</h2> <p>You can run this application on your local computer.</p> <h4 id="configure-the-settings" data-state="closed">Configure the Settings</h4> <p>Your application will need to know more about you before it can run successfully. Edit the environment variables (<code>.env</code>) to reflect the settings you want to use:</p> <ul class="mb-3 list-outside list-disc space-y-2"> <li class=""><code>YOUR_TWILIO_ACCOUNT_SID</code>: The Account SID from your Twilio Account Dashboard.</li> <li class=""><code>YOUR_TWILIO_AUTH_TOKEN</code>: The Auth Token from your Twilio Account Dashboard.</li> <li class=""><code>DG_KEY</code>: The API Key you created earlier in this tutorial.</li> </ul> <p>Once these variables are set, the application should run automatically.</p> <h3 id="run-on-localhost" data-state="closed">Run on localhost</h3> <p>To run this project on your local computer you will need to clone the repository, configure the settings, install the dependencies, and start the server.</p> <h4 id="clone-the-repository" data-state="closed">Clone the Repository</h4> <p>Either clone or download the <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://github.com/deepgram-devs/recorded-call-transcription">GitHub repository<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a> to your local machine in a new directory:</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[''] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">Bash</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line"># Clone this repo</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line">git clone https://github.com/deepgram-devs/recorded-call-transcription.git</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"></span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># Move to the created directory</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line">cd recorded-call-transcription</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h4 id="configure-the-settings-1" data-state="closed">Configure the Settings</h4> <p>Your application will need to know more about you before it can run. Copy the<code>.env-example</code> file into a new file named <code>.env</code>, and edit the new file to reflect the settings you want to use:</p> <ul class="mb-3 list-outside list-disc space-y-2"> <li class=""><code>DG_KEY</code>: The API Key you created earlier in this tutorial.</li> <li class=""><code>YOUR_TWILIO_ACCOUNT_SID</code>: The Account SID from your Twilio Account Dashboard.</li> <li class=""><code>YOUR_TWILIO_AUTH_TOKEN</code>: The Auth Token from your Twilio Account Dashboard.</li> </ul> <h4 id="create-a-virtual-environment-optional" data-state="closed">Create a Virtual Environment (optional)</h4> <p>Create a virtual Python environment to run the server in isolation and prevent version collisions with other projects. (You can skip this part if you don’t mind installing things system-wide.)</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[''] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">Bash</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line"># Create the virtual environment</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># (Must be run only once.)</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line">python3 -m venv dg-twilio-ve</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"></span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># Activate the virtual environment</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># (Must be run every time you open a new terminal.)</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line">source dg-twilio-ve/bin/activate</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># Your prompt should start with `(dg-twilio-ve)`.</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"></span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># python3 and pip3 will now run in this virtual environment.</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>></span></td><td class="code-block-line-content"><span class="line"># If you want to deactivate this environment, type `deactivate`.</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h4 id="install-the-dependencies" data-state="closed">Install the Dependencies</h4> <p>In the directory where you downloaded the code, run the following command to bring in the dependencies needed for this project:</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[''] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">Bash</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line">pip3 install -r requirements.txt</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h4 id="start-the-server" data-state="closed">Start the Server</h4> <p>Now that you have configured your application and put the dependencies in place, your application is ready to go! Run it with:</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[''] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">Bash</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line">FLASK_APP=server.py FLASK_ENV=development flask run</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h2 id="code-walk-through" data-state="closed">Code Walk-through</h2> <p>The application uses Flask to serve a website that generates a phone call to a phone number you provide. Once the call has concluded, a recording is sent to the Deepgram API for transcription. Once the transcription has been returned, the website displays the results.</p> <h3 id="sending-recordings-to-the-deepgram-api" data-state="closed">Sending Recordings to the Deepgram API</h3> <p>When a call ends, the application calls the <code>/transcribe/</code> endpoint, passing a URL that was provided by Twilio to the call’s recording. The server then sends that URL to Deepgram to transcribe. Once the transcription is complete, the application returns it to the front-end as a JSON object.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[''] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">Python</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">@app.route('/transcribe/', methods=['POST'])</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line">def transcribe() -> dict:</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> body = json.loads(request.data)</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> print("got request in transcribe:", body)</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line"> print('sending recording to deepgram')</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>6</span></td><td class="code-block-line-content"><span class="line"> # Submit the recording to Deepgram</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>7</span></td><td class="code-block-line-content"><span class="line"> deepgram_req = requests.post(</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>8</span></td><td class="code-block-line-content"><span class="line"> 'https://api.deepgram.com/v1/listen?punctuate=true',</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>9</span></td><td class="code-block-line-content"><span class="line"> headers={'Authorization': 'token ' + DEEPGRAM_API_KEY,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>10</span></td><td class="code-block-line-content"><span class="line"> "content-type": "application/json"},</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>11</span></td><td class="code-block-line-content"><span class="line"> json={"url": body["audio_url"]}</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>12</span></td><td class="code-block-line-content"><span class="line"> )</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>13</span></td><td class="code-block-line-content"><span class="line"> print('done processing request, sending deepgram response back to client',</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>14</span></td><td class="code-block-line-content"><span class="line"> deepgram_req.text)</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>15</span></td><td class="code-block-line-content"><span class="line"> return json.loads(deepgram_req.text)</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <hr/> <p>What’s Next</p> <ul class="mb-3 list-outside list-disc space-y-2"> <li class=""><a class="fern-mdx-link" href="/docs/on-premise-twilio-integration">Twilio and Deepgram</a></li> </ul></div><footer class="mt-12"><div class="flex gap-4 max-sm:flex-col sm:justify-between"><div><div><div class="flex w-full flex-wrap items-center justify-between gap-4"><div class="flex items-center justify-start gap-2"><span class="t-muted text-sm font-medium">Was this page helpful?</span><span class="fern-button-group"><button tabindex="0" data-state="closed" aria-disabled="false" data-selected="false" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:Rpat8um:" class="fern-button outlined normal"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class=""><path d="M16.4724 20H4.1C3.76863 20 3.5 19.7314 3.5 19.4V9.6C3.5 9.26863 3.76863 9 4.1 9H6.86762C7.57015 9 8.22116 8.6314 8.5826 8.02899L11.293 3.51161C11.8779 2.53688 13.2554 2.44422 13.9655 3.33186C14.3002 3.75025 14.4081 4.30635 14.2541 4.81956L13.2317 8.22759C13.1162 8.61256 13.4045 9 13.8064 9H18.3815C19.7002 9 20.658 10.254 20.311 11.5262L18.4019 18.5262C18.1646 19.3964 17.3743 20 16.4724 20Z" stroke="currentColor" stroke-linecap="round"></path><path d="M7 20L7 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">Yes</span></span></button><button tabindex="0" data-state="closed" aria-disabled="false" data-selected="false" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:R19at8um:" class="fern-button outlined normal"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class=""><path d="M16.4724 3.5H4.1C3.76863 3.5 3.5 3.76863 3.5 4.1V13.9C3.5 14.2314 3.76863 14.5 4.1 14.5H6.86762C7.57015 14.5 8.22116 14.8686 8.5826 15.471L11.293 19.9884C11.8779 20.9631 13.2554 21.0558 13.9655 20.1681C14.3002 19.7497 14.4081 19.1937 14.2541 18.6804L13.2317 15.2724C13.1162 14.8874 13.4045 14.5 13.8064 14.5H18.3815C19.7002 14.5 20.658 13.246 20.311 11.9738L18.4019 4.97376C18.1646 4.10364 17.3743 3.5 16.4724 3.5Z" stroke="currentColor" stroke-linecap="round"></path><path d="M7 14.5L7 3.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">No</span></span></button></span></div></div></div></div><a tabindex="0" aria-disabled="false" data-state="off" class="fern-button outlined normal" target="_blank" rel="noreferrer" href="https://github.com/deepgram/deepgram-fern-config/blob/main/fern/docs/transcribe-recorded-calls-with-twilio.mdx?plain=1"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M3 21L12 21H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12.2218 5.82839L15.0503 2.99996L20 7.94971L17.1716 10.7781M12.2218 5.82839L6.61522 11.435C6.42769 11.6225 6.32233 11.8769 6.32233 12.1421L6.32233 16.6776L10.8579 16.6776C11.1231 16.6776 11.3774 16.5723 11.565 16.3847L17.1716 10.7781M12.2218 5.82839L17.1716 10.7781" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">Edit this page</span></span></a></div><div class="not-prose grid grid-cols-1"><a class="fern-card interactive my-12 flex flex-1 items-center rounded-xl p-6" href="/docs/deepgram-with-amazon-connect"><div class="flex-1"><div class="text-base font-semibold">Amazon Connect and Deepgram</div></div><span class="sm-4 t-muted sm:border-default inline-flex items-center gap-2 py-2.5 text-sm sm:ml-6 sm:border-l sm:pl-6"><span class="hidden leading-none sm:inline">Up Next</span><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="size-icon"><path d="M9 6L15 12L9 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></a></div></footer><style> #builtwithfern { display: flex !important; opacity: 100% !important; } #builtwithfern * { display: initial !important; width: unset !important; opacity: 100% !important; } #builtwithfern, #builtwithfern * { visibility: initial !important; overflow: visible !important; position: relative !important; left: unset !important; top: unset !important; right: unset !important; bottom: unset !important; inset: unset !important; }</style><a id="builtwithfern" class="mx-auto flex items-baseline gap-1 mx-auto my-8 w-fit" href="https://buildwithfern.com/?utm_campaign=buildWith&utm_medium=docs&utm_source=developers.deepgram.com" data-state="closed"><span class="t-muted whitespace-nowrap text-xs">Built with</span><svg viewBox="0 0 604 164" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition" style="aspect-ratio:604/164;height:14px;margin-top:-2px"><path fill-rule="evenodd" clip-rule="evenodd" d="M295.294 0H255.861H255.836C234.047 0 221.437 11.4661 221.437 33.483V47.2372H193.242V75.2033H221.437V160.5H253.547V75.2033H288.404V47.2372H253.547V37.3728C253.547 30.7118 257.208 27.9661 263.87 27.9661H295.294V0ZM345.26 43.8081C311.777 43.8081 288.844 67.1979 288.844 103.198H288.87C288.87 139.884 311.802 163.96 346.43 163.96C375.311 163.96 392.727 149.291 399.388 126.816H366.591C363.591 133.02 356.955 137.367 346.633 137.367C331.277 137.367 321.87 129.562 320.497 115.35H400.761C401.219 110.545 401.447 106.401 401.447 102.283C401.447 66.2826 378.744 43.8081 345.26 43.8081ZM369.108 90.5877V91.0453H320.269C321.184 77.7487 329.675 69.0284 345.26 69.0284C360.845 69.0284 369.108 77.7487 369.108 90.5877ZM412.668 47.2321H440.863V67.1898C443.609 54.3508 452.787 47.2321 467.227 47.2321H487.414V51.122C487.414 64.4186 476.634 75.1982 463.338 75.1982C450.727 75.1982 444.753 81.6304 444.753 94.4694V160.52H412.642V47.2321H412.668ZM526.939 47.24H498.744H498.719V160.503H530.829V96.0789C530.829 81.6382 539.321 72.6891 552.16 72.6891C564.999 72.6891 571.889 80.0366 571.889 95.1637V160.528H604V91.7315C604 61.7061 586.559 43.8078 558.821 43.8078C545.753 43.8078 533.601 48.8417 526.939 58.7061V47.24Z" class="fill-grayscale-a10"></path><path d="M149.383 80.2222C138.594 71.101 122.341 67.4445 107.936 78.0925C107.273 78.5747 106.449 77.751 106.952 77.1081C110.367 72.7082 114.325 67.9668 117.519 63.2053C120.774 58.3233 125.636 54.8275 131.241 53.1198C161.076 44.079 152.116 0 152.116 0C152.116 0 106.027 2.97342 111.713 42.7329C112.657 49.3829 110.889 56.1535 106.731 61.4374C101.628 67.8865 95.7008 74.0543 91.4014 78.5144C90.4973 79.4386 88.9705 78.5546 89.3321 77.309C93.4909 63.3058 96.5246 41.648 82.1195 27.685L61.848 10.849L57.9504 15.9922C46.3581 31.2812 49.7534 52.8385 65.0625 64.4108C73.8422 71.0407 77.8201 78.2533 77.1973 86.169C76.8156 90.9104 74.6659 95.3505 71.4514 98.8663C65.4041 105.496 59.7586 112.608 55.3989 120.846C54.7962 121.991 53.0483 121.549 53.1086 120.243C53.7314 106.641 52.4255 75.983 29.5221 65.0336L3.88635 55.1289L1.89737 61.0556C-4.55174 80.182 5.99588 100.614 25.1021 107.104C41.7171 112.749 47.6439 123.457 43.6458 139.51C43.465 140.092 40.572 156.627 40.9738 163.96H59.3969C60.0198 152.589 71.9536 145.115 82.3003 149.756C85.2135 151.062 88.207 152.93 91.2809 155.341C107.755 168.32 132.025 165.246 144.983 148.752L148.68 144.05L125.375 127.315C109.383 114.738 88.0463 120.424 72.255 131.192C70.929 132.096 69.2414 130.65 69.9847 129.203C89.0709 91.7542 113.883 91.8346 123.607 100.152C135.4 110.238 153.261 108.429 163.266 96.5961L166.139 93.2007L149.363 80.2222H149.383Z" class="fill-grayscale-a10"></path></svg></a></article></main></div></div><footer id="fern-footer" class=""></footer></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"baseUrl":{"domain":"developers.deepgram.com"},"layout":{"pageWidth":{"type":"full"},"searchbarPlacement":"HEADER","tabsPlacement":"HEADER","contentAlignment":"CENTER","headerPosition":"FIXED","disableHeader":false},"title":"Deepgram | Documentation","favicon":"c0798b79-351f-4c5c-9cb0-da1187e4cfd5","colors":{"dark":{"type":"dark","accentPrimary":{"r":161,"g":249,"b":212,"a":1},"logo":"21164049-89d5-4434-9f59-14ed2e474ec3","background":{"type":"solid","r":11,"g":11,"b":12,"a":1},"border":{"r":44,"g":44,"b":51,"a":1},"cardBackground":{"r":26,"g":26,"b":31,"a":1},"sidebarBackground":{"r":11,"g":11,"b":12,"a":1},"headerBackground":{"r":26,"g":26,"b":31,"a":1}}},"js":{"remote":[{"url":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/component.js","strategy":"lazyOnload"},{"url":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/dist/output.js","strategy":"beforeInteractive"}]},"navbarLinks":[],"logo":{"height":24,"href":"/","dark":{"src":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/logo.svg","width":176,"height":25}},"content":{"slug":"docs/transcribe-recorded-calls-with-twilio","title":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var l=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var _=(n,e)=\u003e()=\u003e(e||n((e={exports:{}}).exports,e),e.exports),h=(n,e)=\u003e{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},d=(n,e,t,i)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let o of x(e))!M.call(n,o)\u0026\u0026o!==t\u0026\u0026s(n,o,{get:()=\u003ee[o],enumerable:!(i=f(e,o))||i.enumerable});return n};var w=(n,e,t)=\u003e(t=n!=null?l(C(n)):{},d(e||!n||!n.__esModule?s(t,\"default\",{value:n,enumerable:!0}):t,n)),D=n=\u003ed(s({},\"__esModule\",{value:!0}),n);var a=_((v,u)=\u003e{u.exports=_jsx_runtime});var b={};h(b,{default:()=\u003ep,frontmatter:()=\u003eX});var r=w(a());var{useMDXComponents:c}=MdxJsReact;var X=void 0;function m(n){let e={p:\"p\",...c(),...n.components};return(0,r.jsx)(e.p,{children:\"Transcribe Recorded Calls With Twilio\"})}function p(n={}){let{wrapper:e}={...c(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(m,{...n})}):m(n)}return D(b);})();\n;return Component;","frontmatter":{},"scope":{},"jsxRefs":[]},"subtitle":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var l=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var _=(n,e)=\u003e()=\u003e(e||n((e={exports:{}}).exports,e),e.exports),C=(n,e)=\u003e{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},d=(n,e,t,i)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let o of x(e))!M.call(n,o)\u0026\u0026o!==t\u0026\u0026s(n,o,{get:()=\u003ee[o],enumerable:!(i=f(e,o))||i.enumerable});return n};var D=(n,e,t)=\u003e(t=n!=null?l(h(n)):{},d(e||!n||!n.__esModule?s(t,\"default\",{value:n,enumerable:!0}):t,n)),w=n=\u003ed(s({},\"__esModule\",{value:!0}),n);var u=_((y,a)=\u003e{a.exports=_jsx_runtime});var b={};C(b,{default:()=\u003em,frontmatter:()=\u003eX});var r=D(u());var{useMDXComponents:c}=MdxJsReact;var X=void 0;function p(n){let e={p:\"p\",...c(),...n.components};return(0,r.jsx)(e.p,{children:\"With Twilio and Deepgram you can record and transcribe your phone calls.\"})}function m(n={}){let{wrapper:e}={...c(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(p,{...n})}):p(n)}return w(b);})();\n;return Component;","frontmatter":{},"scope":{},"jsxRefs":[]},"tableOfContents":[{"simpleString":"Before You Begin","anchorString":"before-you-begin","children":[{"simpleString":"Create a Deepgram API Key","anchorString":"create-a-deepgram-api-key","children":[]},{"simpleString":"Gather Twilio Credentials","anchorString":"gather-twilio-credentials","children":[]}]},{"simpleString":"Getting Started","anchorString":"getting-started","children":[{"simpleString":"Configure the Settings","anchorString":"configure-the-settings","children":[]},{"simpleString":"Run on localhost","anchorString":"run-on-localhost","children":[{"simpleString":"Clone the Repository","anchorString":"clone-the-repository","children":[]},{"simpleString":"Configure the Settings","anchorString":"configure-the-settings-1","children":[]},{"simpleString":"Create a Virtual Environment (optional)","anchorString":"create-a-virtual-environment-optional","children":[]},{"simpleString":"Install the Dependencies","anchorString":"install-the-dependencies","children":[]},{"simpleString":"Start the Server","anchorString":"start-the-server","children":[]}]}]},{"simpleString":"Code Walk-through","anchorString":"code-walk-through","children":[{"simpleString":"Sending Recordings to the Deepgram API","anchorString":"sending-recordings-to-the-deepgram-api","children":[]}]}],"content":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var g=Object.create;var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var b=(t,e)=\u003e()=\u003e(e||t((e={exports:{}}).exports,e),e.exports),v=(t,e)=\u003e{for(var i in e)a(t,i,{get:e[i],enumerable:!0})},d=(t,e,i,o)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let r of y(e))!w.call(t,r)\u0026\u0026r!==i\u0026\u0026a(t,r,{get:()=\u003ee[r],enumerable:!(o=m(e,r))||o.enumerable});return t};var T=(t,e,i)=\u003e(i=t!=null?g(f(t)):{},d(e||!t||!t.__esModule?a(i,\"default\",{value:t,enumerable:!0}):i,t)),A=t=\u003ed(a({},\"__esModule\",{value:!0}),t);var c=b((x,h)=\u003e{h.exports=_jsx_runtime});var _={};v(_,{default:()=\u003ep,frontmatter:()=\u003eD});var n=T(c());var{useMDXComponents:l}=MdxJsReact;var D={title:\"Transcribe Recorded Calls With Twilio\",subtitle:\"With Twilio and Deepgram you can record and transcribe your phone calls.\",slug:\"docs/transcribe-recorded-calls-with-twilio\"};function s(t){let e={a:\"a\",code:\"code\",h2:\"h2\",h3:\"h3\",h4:\"h4\",hr:\"hr\",li:\"li\",p:\"p\",strong:\"strong\",ul:\"ul\",...l(),...t.components},{CodeBlocks:i,Info:o}=e;return i||u(\"CodeBlocks\",!0),o||u(\"Info\",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.p,{children:\"The wealth of knowledge in the conversations that happen during your sales and support calls can be left untapped without automatic transcription. Using Deepgram\\u2019s Transcription API, you can gather the data you need to make informed decisions about your organization\\u2019s interactions.\"}),`\n`,(0,n.jsx)(o,{children:(0,n.jsxs)(e.p,{children:[\"The demo code in this guide uses an older version of our Node SDK. A new version of our SDK is now available. \",(0,n.jsx)(e.a,{href:\"/docs/js-sdk-v2-to-v3-migration-guide\",children:\"A migration guide is available\"}),\".\"]})}),`\n`,(0,n.jsx)(e.h2,{id:\"before-you-begin\",children:\"Before You Begin\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"The example provided is written in Node.js, and you can find the code on \",(0,n.jsx)(e.a,{href:\"https://github.com/deepgram-devs/video-chat\",children:\"GitHub\"}),\".\"]}),`\n`,(0,n.jsx)(e.p,{children:\"Before you run the code, you\\u2019ll need to do a few things:\"}),`\n`,(0,n.jsx)(o,{children:(0,n.jsxs)(e.p,{children:[\"Before you can use Deepgram, you\\u2019ll need to \",(0,n.jsx)(e.a,{href:\"https://console.deepgram.com/signup?jump=keys\",children:\"create a Deepgram account\"}),\". Signup is free and includes \",(0,n.jsx)(e.strong,{children:\"$200\"}),\" in free credit and access to all of Deepgram\\u2019s features!\"]})}),`\n`,(0,n.jsx)(e.h3,{id:\"create-a-deepgram-api-key\",children:\"Create a Deepgram API Key\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"To access Deepgram\\u2019s API, you\\u2019ll need to \",(0,n.jsx)(e.a,{href:\"https://console.deepgram.com/signup?jump=keys\",children:\"create a Deepgram API Key\"}),\". Make note of your API Key; you will need it later.\"]}),`\n`,(0,n.jsx)(e.h3,{id:\"gather-twilio-credentials\",children:\"Gather Twilio Credentials\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"This application uses Twilio Voice to start a phone call that will be recorded and transcribed. Before you can use Twilio products, you\\u2019ll need to \",(0,n.jsx)(e.a,{href:\"https://twilio.com\",children:\"sign up for a Twilio account\"}),\".\"]}),`\n`,(0,n.jsx)(e.p,{children:\"To use the sample application, you\\u2019ll need a Twilio Account SID and Twilio Auth Token. These can both be found within your Twilio account dashboard.\"}),`\n`,(0,n.jsx)(e.h2,{id:\"getting-started\",children:\"Getting Started\"}),`\n`,(0,n.jsx)(e.p,{children:\"You can run this application on your local computer.\"}),`\n`,(0,n.jsx)(e.h4,{id:\"configure-the-settings\",children:\"Configure the Settings\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Your application will need to know more about you before it can run successfully. Edit the environment variables (\",(0,n.jsx)(e.code,{children:\".env\"}),\") to reflect the settings you want to use:\"]}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"YOUR_TWILIO_ACCOUNT_SID\"}),\": The Account SID from your Twilio Account Dashboard.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"YOUR_TWILIO_AUTH_TOKEN\"}),\": The Auth Token from your Twilio Account Dashboard.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"DG_KEY\"}),\": The API Key you created earlier in this tutorial.\"]}),`\n`]}),`\n`,(0,n.jsx)(e.p,{children:\"Once these variables are set, the application should run automatically.\"}),`\n`,(0,n.jsx)(e.h3,{id:\"run-on-localhost\",children:\"Run on localhost\"}),`\n`,(0,n.jsx)(e.p,{children:\"To run this project on your local computer you will need to clone the repository, configure the settings, install the dependencies, and start the server.\"}),`\n`,(0,n.jsx)(e.h4,{id:\"clone-the-repository\",children:\"Clone the Repository\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Either clone or download the \",(0,n.jsx)(e.a,{href:\"https://github.com/deepgram-devs/recorded-call-transcription\",children:\"GitHub repository\"}),\" to your local machine in a new directory:\"]}),`\n`,(0,n.jsx)(i,{items:[{code:`# Clone this repo\ngit clone https://github.com/deepgram-devs/recorded-call-transcription.git\n\n# Move to the created directory\ncd recorded-call-transcription\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"Bash\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,n.jsx)(e.h4,{id:\"configure-the-settings-1\",children:\"Configure the Settings\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Your application will need to know more about you before it can run. Copy the\",(0,n.jsx)(e.code,{children:\".env-example\"}),\" file into a new file named \",(0,n.jsx)(e.code,{children:\".env\"}),\", and edit the new file to reflect the settings you want to use:\"]}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"DG_KEY\"}),\": The API Key you created earlier in this tutorial.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"YOUR_TWILIO_ACCOUNT_SID\"}),\": The Account SID from your Twilio Account Dashboard.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:\"YOUR_TWILIO_AUTH_TOKEN\"}),\": The Auth Token from your Twilio Account Dashboard.\"]}),`\n`]}),`\n`,(0,n.jsx)(e.h4,{id:\"create-a-virtual-environment-optional\",children:\"Create a Virtual Environment (optional)\"}),`\n`,(0,n.jsx)(e.p,{children:\"Create a virtual Python environment to run the server in isolation and prevent version collisions with other projects. (You can skip this part if you don\\u2019t mind installing things system-wide.)\"}),`\n`,(0,n.jsx)(i,{items:[{code:`# Create the virtual environment\n# (Must be run only once.)\npython3 -m venv dg-twilio-ve\n\n# Activate the virtual environment\n# (Must be run every time you open a new terminal.)\nsource dg-twilio-ve/bin/activate\n# Your prompt should start with \\`(dg-twilio-ve)\\`.\n\n# python3 and pip3 will now run in this virtual environment.\n# If you want to deactivate this environment, type \\`deactivate\\`.\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"Bash\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,n.jsx)(e.h4,{id:\"install-the-dependencies\",children:\"Install the Dependencies\"}),`\n`,(0,n.jsx)(e.p,{children:\"In the directory where you downloaded the code, run the following command to bring in the dependencies needed for this project:\"}),`\n`,(0,n.jsx)(i,{items:[{code:`pip3 install -r requirements.txt\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"Bash\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,n.jsx)(e.h4,{id:\"start-the-server\",children:\"Start the Server\"}),`\n`,(0,n.jsx)(e.p,{children:\"Now that you have configured your application and put the dependencies in place, your application is ready to go! Run it with:\"}),`\n`,(0,n.jsx)(i,{items:[{code:`FLASK_APP=server.py FLASK_ENV=development flask run\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"Bash\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,n.jsx)(e.h2,{id:\"code-walk-through\",children:\"Code Walk-through\"}),`\n`,(0,n.jsx)(e.p,{children:\"The application uses Flask to serve a website that generates a phone call to a phone number you provide. Once the call has concluded, a recording is sent to the Deepgram API for transcription. Once the transcription has been returned, the website displays the results.\"}),`\n`,(0,n.jsx)(e.h3,{id:\"sending-recordings-to-the-deepgram-api\",children:\"Sending Recordings to the Deepgram API\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"When a call ends, the application calls the \",(0,n.jsx)(e.code,{children:\"/transcribe/\"}),\" endpoint, passing a URL that was provided by Twilio to the call\\u2019s recording. The server then sends that URL to Deepgram to transcribe. Once the transcription is complete, the application returns it to the front-end as a JSON object.\"]}),`\n`,(0,n.jsx)(i,{items:[{code:`@app.route('/transcribe/', methods=['POST'])\ndef transcribe() -\u003e dict:\n body = json.loads(request.data)\n print(\"got request in transcribe:\", body)\n print('sending recording to deepgram')\n # Submit the recording to Deepgram\n deepgram_req = requests.post(\n 'https://api.deepgram.com/v1/listen?punctuate=true',\n headers={'Authorization': 'token ' + DEEPGRAM_API_KEY,\n \"content-type\": \"application/json\"},\n json={\"url\": body[\"audio_url\"]}\n )\n print('done processing request, sending deepgram response back to client',\n deepgram_req.text)\n return json.loads(deepgram_req.text)\n`,language:\"python\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"Python\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,n.jsx)(e.hr,{}),`\n`,(0,n.jsx)(e.p,{children:\"What\\u2019s Next\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:\"/docs/on-premise-twilio-integration\",children:\"Twilio and Deepgram\"})}),`\n`]})]})}function p(t={}){let{wrapper:e}={...l(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(s,{...t})}):s(t)}function u(t,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+t+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return A(_);})();\n;return Component;","frontmatter":{"title":"Transcribe Recorded Calls With Twilio","subtitle":"With Twilio and Deepgram you can record and transcribe your phone calls.","slug":"docs/transcribe-recorded-calls-with-twilio","edit-this-page-url":"https://github.com/deepgram/deepgram-fern-config/blob/main/fern/docs/transcribe-recorded-calls-with-twilio.mdx?plain=1"},"scope":{},"jsxRefs":["Info","CodeGroup"]},"breadcrumb":[{"title":"Use Case Examples","pointsTo":"docs/build-voice-agent-with-twilio-deepgram-openai"}],"neighbors":{"prev":{"slug":"docs/transcribe-meetings-in-realtime","title":"Transcribe Meetings in Realtime"},"next":{"slug":"docs/deepgram-with-amazon-connect","title":"Amazon Connect and Deepgram"}},"hasAside":false,"type":"markdown-page","apis":{},"endpointIdsToSlugs":{}},"navigation":{"currentTabIndex":6,"tabs":[{"type":"tabGroup","title":"Home","index":0,"slug":"home","pointsTo":"home/introduction"},{"type":"tabGroup","title":"Voice Agent","index":1,"slug":"voice-agent","pointsTo":"docs/voice-agent"},{"type":"tabGroup","title":"Speech to Text","index":2,"slug":"speech-to-text","pointsTo":"docs/pre-recorded-audio"},{"type":"tabGroup","title":"Text to Speech","index":3,"slug":"text-to-speech","pointsTo":"docs/tts-rest"},{"type":"tabGroup","title":"Intelligence","index":4,"slug":"intelligence","pointsTo":"docs/audio-intelligence"},{"type":"tabGroup","title":"API Ref","index":5,"slug":"reference","pointsTo":"reference/deepgram-api-overview"},{"type":"tabGroup","title":"Guides","index":6,"slug":"docs","pointsTo":"docs/make-your-first-api-request"},{"type":"tabGroup","title":"SDKs","index":7,"slug":"sdks","pointsTo":"docs/deepgram-sdks"},{"type":"tabGroup","title":"Self-Hosted Deployments","index":8,"slug":"self-hosted","pointsTo":"docs/self-hosted-introduction"},{"type":"tabGroup","title":"Security","index":9,"slug":"security","pointsTo":"docs/security-policy"}],"versions":[],"sidebar":{"type":"sidebarRoot","id":"e70a6092a728d122c5e85dd23101166726fa4d83c0ae8751a1ebdd8dbbfcc3a5","children":[{"type":"section","id":"ec27da4775293db97c382f6e6c72bc834579fff5fe8297b2b1b7ee035fd49122","children":[{"type":"page","id":"72597ceb0635f8c20461f5337e7cdc78abf13f95c06822a389268da34555f749","title":"Make Your First API Request","slug":"docs/make-your-first-api-request","pageId":"docs/make-your-first-api-request.mdx"},{"type":"page","id":"17d112c737122bee22a39f5f5ac8025e3f693ae494163f457fe60bd3ed5c8add","title":"Authenticating","slug":"docs/authenticating","pageId":"docs/authenticating.mdx"},{"type":"page","id":"fec90bb78783684dc4414501def0851ccf7dff7d1984b738b516de9932bda853","title":"Model Metadata","slug":"docs/model-metadata","pageId":"docs/model-metadata.mdx"},{"type":"page","id":"bf4ba24d3e610464ef6c25f90db8192670df1d766422218e0639782a00022f79","title":"Managing Projects","slug":"docs/managing-projects","pageId":"docs/managing-projects.mdx"},{"type":"page","id":"6e5a81d8593b9492953aa49c2d23f971537726b87ad84ac0949c9861f35b2ba3","title":"Using Multiple Projects","slug":"docs/using-multiple-projects","pageId":"docs/using-multiple-projects.mdx"},{"type":"page","id":"3fb86ef1d374c1ac3350ec8acfa8d0526140409594a0cacf87192399c4009ac3","title":"Working With Roles \u0026 API Scopes","slug":"docs/working-with-roles","pageId":"docs/working-with-roles.mdx"},{"type":"page","id":"41a157108029592c093c7499545c4dec805c71c529b33d26eb8c5a3a163a5f93","title":"Supported Audio Formats","slug":"docs/supported-audio-formats","pageId":"docs/supported-audio-formats.mdx"},{"type":"page","id":"61bf2ff42bbbd494643e7cc6a5940751a066f8292d21962da8a1232377c5e486","title":"Deployment Options","slug":"docs/deployment-options","pageId":"docs/deployment-options.mdx"},{"type":"page","id":"ebe1dd70e58a1952bbb87a12d90efa75a11919a3749de91c1535c623d70f6b21","title":"Creating API Keys","slug":"docs/create-additional-api-keys","pageId":"docs/create-additional-api-keys.mdx"},{"type":"page","id":"130253c7d32a0badaa649170d5341cbc84acd66bebe1a3415abc543106de4f5d","title":"Using the Sec-WebSocket-Protocol","slug":"docs/using-the-sec-websocket-protocol","pageId":"docs/using-the-sec-websocket-protocol.mdx"},{"type":"page","id":"dacdcb100e05959c173b4724f33fa5642f412513e94f60628ffb62dd7e1619b7","title":"Logs \u0026 Usage Data","slug":"docs/using-logs-usage","pageId":"docs/using-logs-usage.mdx"},{"type":"page","id":"f63f72d7546864bc3d88a81c71c0702c4e4616699fb0a2d9a4da2b1dda5a2c5a","title":"Model Improvement Partnership Program","slug":"docs/the-deepgram-model-improvement-partnership-program","pageId":"docs/the-deepgram-model-improvement-partnership-program.mdx"},{"type":"page","id":"ec6f3cd6a7c662a1f385e413377af725aa9c87d3c81938dbcf295799b0c751cb","title":"Working With Concurrency Rate Limits","slug":"docs/working-with-concurrency-rate-limits","pageId":"docs/working-with-concurrency-rate-limits.mdx"}],"title":"Fundamentals","slug":"docs/fundamentals","pointsTo":"docs/make-your-first-api-request"},{"type":"section","id":"0da5260fb2953b1d8dec9b7bbfff502df209197366bd8ea4273e0f68ec592d1b","children":[{"type":"page","id":"84226d8c3d9f65d3e764287f2caf9fe049ba9301c32ac2aa9f8e8800fa7bfc2a","title":"Build a Voice Agent with Twilio \u0026 OpenAI \u0026 Deepgram","slug":"docs/build-voice-agent-with-twilio-deepgram-openai","pageId":"docs/build-voice-agent-with-twilio-deepgram-openai.mdx"},{"type":"page","id":"4fdf9d75e08e4056377bda237adc9c939e18c5aa13a763b8e652ddf110943330","title":"Calculate Talk Time Analytics","slug":"docs/calculate-talk-time-analytics","pageId":"docs/calculate-talk-time-analytics.mdx"},{"type":"page","id":"3f550d055ddfed8ce8f317b1e7d868d046b2ce4961da1cd92c1b0641a042a89f","title":"Transcribe Meetings in Realtime","slug":"docs/transcribe-meetings-in-realtime","pageId":"docs/transcribe-meetings-in-realtime.mdx"},{"type":"page","id":"ea66ac82dc140406c6f810e95c5278b5f6568280951912ed08b6227f0f8d886b","title":"Transcribe Recorded Calls With Twilio","slug":"docs/transcribe-recorded-calls-with-twilio","pageId":"docs/transcribe-recorded-calls-with-twilio.mdx"}],"title":"Use Case Examples","slug":"docs/use-case-examples","pointsTo":"docs/build-voice-agent-with-twilio-deepgram-openai"},{"type":"section","id":"5da5cc748af705d3bad0f55d6b164e274ebe00d2640598a748897560acc2bc00","children":[{"type":"page","id":"016a2cdf3132c8ee79ae2347b7b2e1304aaf6acd5bf962544643e34d7b7165fa","title":"Amazon Connect and Deepgram","slug":"docs/deepgram-with-amazon-connect","pageId":"docs/deepgram-with-amazon-connect.mdx"},{"type":"page","id":"f52bc4b28d07642b2a8313330f8579cd9b64482ac1eabb9586c361a4a234bbe6","title":"AWS S3 Presigned URLs and Deepgram","slug":"docs/using-aws-s3-presigned-urls-with-the-deepgram-api","pageId":"docs/using-aws-s3-presigned-urls-with-the-deepgram-api.mdx"},{"type":"page","id":"caf1dd1d39d0634d7d6a5895787cd70748ccc40393a397fc9b83e6a9e7840069","title":"Genesys and Deepgram","slug":"docs/genesys-with-deepgram","pageId":"docs/genesys-with-deepgram.mdx"},{"type":"page","id":"38dfc5c6acdc8bf48c2b7901677f0f539e8a2620dcbf56de8b483e431f8ea179","title":"Google Dialogflow CX and Deepgram","slug":"docs/use-deepgram-with-dialogflow-cx","pageId":"docs/use-deepgram-with-dialogflow-cx.mdx"},{"type":"page","id":"0aa13cd9944ce5fe355137ee7179a7f689871a3e249813fcc3a18ba7a6d3e0ac","title":"Make.com and Deepgram","slug":"docs/makecom-deepgram-integration","pageId":"docs/makecom-deepgram-integration.mdx"},{"type":"page","id":"4d7939a92a79d60757ba480ad93dc6d1056a68a414d3a6108b0b9102c56c7278","title":"Twilio and Deepgram STT","slug":"docs/on-premise-twilio-integration","pageId":"docs/on-premise-twilio-integration.mdx"},{"type":"page","id":"40ac5dece0044a0df752fba46d04d9aadd53171e4380ba4d50209210b22642da","title":"Twilio and Deepgram TTS","slug":"docs/twilio-and-deepgram-tts","pageId":"docs/twilio-and-deepgram-tts.mdx"},{"type":"page","id":"d99a62dc22499a55b9544bc07d8fd057b6d163d8c47d04b31abc1eada10bcc25","title":"Twilio and Deepgram Voice Agent","slug":"docs/twilio-and-deepgram-voice-agent","pageId":"docs/twilio-and-deepgram-voice-agent.mdx"},{"type":"page","id":"bf1b77093b4e067c31f2d777afa7b1b2224ef587881aff480779b2038c41d9f3","title":"Zapier and Deepgram","slug":"docs/zapier-integration","pageId":"docs/zapier-integration.mdx"},{"type":"page","id":"0916f462098ba6ee6f4df808a6ad63ae8ef6137dc5b3b165d934ab6be6d9278f","title":"Zoom and Deepgram","slug":"docs/integrate-deepgram-with-zoom","pageId":"docs/integrate-deepgram-with-zoom.mdx"}],"title":"Integrations","slug":"docs/integrations","pointsTo":"docs/deepgram-with-amazon-connect"}]},"trailingSlash":false},"edgeFlags":{"isApiPlaygroundEnabled":true,"isApiScrollingDisabled":false,"isWhitelabeled":false,"isSeoDisabled":false,"isTocDefaultEnabled":false,"isSnippetTemplatesEnabled":false,"isSearchDisabled":true,"isHttpSnippetsEnabled":true,"isInlineFeedbackEnabled":false,"isDarkCodeEnabled":false,"isProxyDisabled":false,"isImageZoomDisabled":false,"useJavaScriptAsTypeScript":false,"alwaysEnableJavaScriptFetch":false,"scrollInContainerEnabled":false,"useMdxBundler":true,"isBatchStreamToggleDisabled":false,"isAuthEnabledInDocs":false,"isAskAiEnabled":false,"isAudioFileDownloadSpanSummary":false,"isDocsLogoTextEnabled":false,"isAudioExampleInternal":false,"usesApplicationJsonInFormDataValue":false,"isBinaryOctetStreamAudioPlayer":false,"hasVoiceIdPlaygroundForm":false,"isCohereTheme":false,"isFileForgeHackEnabled":false,"is404PageHidden":false,"isNewSearchExperienceEnabled":false,"isAuthenticatedPagesDiscoverable":false,"isSearchV2Enabled":false},"apis":["3aad03ec-de9f-41a5-9c10-16d52e065d10"],"seo":{"openGraph":{"siteName":"Deepgram | Documentation"},"twitter":{},"additionalMetaTags":[],"additionalLinkTags":[{"rel":"icon","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/favicon.ico","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Inter.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/FiraMono.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Roobert.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"}],"breadcrumbList":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Deepgram | Documentation","item":"https://developers.deepgram.com/"},{"@type":"ListItem","position":2,"name":"Guides","item":"https://developers.deepgram.com/docs"},{"@type":"ListItem","position":3,"name":"Use Case Examples","item":"https://developers.deepgram.com/docs/use-case-examples"},{"@type":"ListItem","position":4,"name":"Transcribe Recorded Calls With Twilio","item":"https://developers.deepgram.com/docs/transcribe-recorded-calls-with-twilio"}]},"canonical":"https://developers.deepgram.com/docs/transcribe-recorded-calls-with-twilio","title":"Transcribe Recorded Calls With Twilio","description":"With Twilio and Deepgram you can record and transcribe your phone calls.","titleTemplate":"%s — Deepgram | Documentation","noindex":false,"nofollow":false},"fallback":{},"theme":"default","analyticsConfig":{},"defaultLang":"curl","stylesheet":"\n:root {\n --typography-body-font-family: 'Inter', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;\n --typography-heading-font-family: 'Roobert', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;\n --typography-code-font-family: 'FiraMono', ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;\n --spacing-page-width: 100%;\n --spacing-content-width: 44rem;\n --spacing-content-wide-width: 66.5rem;\n --spacing-sidebar-width: 18rem;\n --spacing-header-height: 6.75rem;\n --spacing-header-height-padded: 5rem;\n --spacing-header-height-real: 4rem;\n \n --grayscale-1: var(--mauve-1);\n --grayscale-2: var(--mauve-2);\n --grayscale-3: var(--mauve-3);\n --grayscale-4: var(--mauve-4);\n --grayscale-5: var(--mauve-5);\n --grayscale-6: var(--mauve-6);\n --grayscale-7: var(--mauve-7);\n --grayscale-8: var(--mauve-8);\n --grayscale-9: var(--mauve-9);\n --grayscale-10: var(--mauve-10);\n --grayscale-11: var(--mauve-11);\n --grayscale-12: var(--mauve-12);\n --grayscale-a1: var(--mauve-a1);\n --grayscale-a2: var(--mauve-a2);\n --grayscale-a3: var(--mauve-a3);\n --grayscale-a4: var(--mauve-a4);\n --grayscale-a5: var(--mauve-a5);\n --grayscale-a6: var(--mauve-a6);\n --grayscale-a7: var(--mauve-a7);\n --grayscale-a8: var(--mauve-a8);\n --grayscale-a9: var(--mauve-a9);\n --grayscale-a10: var(--mauve-a10);\n --grayscale-a11: var(--mauve-a11);\n --grayscale-a12: var(--mauve-a12);\n --accent-1: #f7f7f9;\n --accent-2: #f1f3f9;\n --accent-3: #e8ebf7;\n --accent-4: #dde2f9;\n --accent-5: #d0d7f8;\n --accent-6: #c0c8f3;\n --accent-7: #abb5eb;\n --accent-8: #8f9be2;\n --accent-9: #7783f7;\n --accent-10: #6c77e9;\n --accent-11: #5158c3;\n --accent-12: #282c5f;\n --accent-a1: #7a3b7c04;\n --accent-a2: #1734c309;\n --accent-a3: #0926c312;\n --accent-a4: #0327ea1d;\n --accent-a5: #0126e92a;\n --accent-a6: #0322d93b;\n --accent-a7: #011ec950;\n --accent-a8: #011cc16d;\n --accent-a9: #0217f486;\n --accent-a10: #0214dc91;\n --accent-a11: #020ca8ad;\n --accent-a12: #010642d7;\n --accent-surface: #eff1f9cc;\n --gray-surface: #ffffffcc;\n --accent: 119, 131, 247;\n --accent-aa: 81, 96, 245;\n --accent-aaa: 32, 52, 243;\n --accent-tinted: 143, 153, 248;\n --background: 249, 250, 251;\n --accent-contrast: rgb(255, 255, 255);\n --bg-color-card: rgba(255, 255, 255, 0.7);\n --sidebar-background: transparent;\n --header-background: transparent;\n --border: var(--grayscale-a4);\n --border-concealed: var(--grayscale-a2);\n --body-text: 0, 0, 0;\n --body-text-inverted: 255, 255, 255;\n}\n\n@media (max-width: 1024px) {\n :root {\n --spacing-header-height: 6.75rem;\n --spacing-header-height-padded: 5rem;\n }\n}\n\n\n:is(.dark) {\n --grayscale-1: var(--gray-1);\n --grayscale-2: var(--gray-2);\n --grayscale-3: var(--gray-3);\n --grayscale-4: var(--gray-4);\n --grayscale-5: var(--gray-5);\n --grayscale-6: var(--gray-6);\n --grayscale-7: var(--gray-7);\n --grayscale-8: var(--gray-8);\n --grayscale-9: var(--gray-9);\n --grayscale-10: var(--gray-10);\n --grayscale-11: var(--gray-11);\n --grayscale-12: var(--gray-12);\n --grayscale-a1: var(--gray-a1);\n --grayscale-a2: var(--gray-a2);\n --grayscale-a3: var(--gray-a3);\n --grayscale-a4: var(--gray-a4);\n --grayscale-a5: var(--gray-a5);\n --grayscale-a6: var(--gray-a6);\n --grayscale-a7: var(--gray-a7);\n --grayscale-a8: var(--gray-a8);\n --grayscale-a9: var(--gray-a9);\n --grayscale-a10: var(--gray-a10);\n --grayscale-a11: var(--gray-a11);\n --grayscale-a12: var(--gray-a12);\n --accent-1: #050d0a;\n --accent-2: #0f1a15;\n --accent-3: #092d21;\n --accent-4: #003d29;\n --accent-5: #004b34;\n --accent-6: #005a40;\n --accent-7: #006b4d;\n --accent-8: #00805b;\n --accent-9: #a1f9d4;\n --accent-10: #97efca;\n --accent-11: #66cfa6;\n --accent-12: #9df5d0;\n --accent-a1: #00b50003;\n --accent-a2: #4bfb9c10;\n --accent-a3: #00fca124;\n --accent-a4: #00fc9735;\n --accent-a5: #00ffa543;\n --accent-a6: #00feac53;\n --accent-a7: #00fdb165;\n --accent-a8: #00fdb07b;\n --accent-a9: #a5ffd9f9;\n --accent-a10: #a0fed6ef;\n --accent-a11: #7dffcccd;\n --accent-a12: #a3ffd8f5;\n --accent-surface: color(display-p3 0.0863 0.1569 0.1255 / 0.5);\n --gray-surface: color(display-p3 0 0 0 / 5%);\n --accent: 161, 249, 212;\n --accent-aa: 161, 249, 212;\n --accent-aaa: 161, 249, 212;\n --accent-tinted: 185, 251, 223;\n --background: 11, 11, 12;\n --accent-contrast: rgb(11, 40, 29);\n --bg-color-card: rgb(26, 26, 31);\n --bg-color-card-solid: rgb(26, 26, 31);\n --sidebar-background: rgb(11, 11, 12);\n --header-background: rgb(26, 26, 31);\n --border: rgb(44, 44, 51);\n --border-concealed: rgb(44, 44, 51);\n --body-text: 255, 255, 255;\n --body-text-inverted: 0, 0, 0;\n}\n\n@font-face {\n font-family: 'Inter';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Inter.woff2') format('woff2');\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'Roobert';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/Roobert.woff2') format('woff2');\n font-weight: 600 900;\n font-style: normal;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'FiraMono';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-20T21:58:25.029Z/assets/FiraMono.woff2') format('woff2');\n font-weight: 100 900;\n font-style: normal;\n font-display: swap;\n}\n\nhtml {\n background-color: #f9fafb;\n}\n\nhtml.dark {\n background-color: #0b0b0c;\n}\n\n\n\n.fern-button.filled {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n}\n\n.fern-header-tab-button[data-state=active] {\n\tcolor: white !important;\n}\n\n.fern-header-tab-button[data-state=active]:after {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n\theight: 2px !important;\n}\n\n.fern-header-tab-button {\n\tpadding-left: 24px !important;\n\tpadding-right: 24px !important;\n}\n\n@media (max-width: 1350px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 16px !important;\n\t\tpadding-right: 16px !important;\n\t}\n}\n\n@media (max-width: 1185px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 12px !important;\n\t\tpadding-right: 12px !important;\n\t}\n}\n\n@media (max-width: 1100px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 8px !important;\n\t\tpadding-right: 8px !important;\n\t}\n}\n\n.fern-mdx-link {\n\tcolor: #79affa !important;\n\ttext-decoration: none;\n}\n\n.fern-mdx-link svg {\n\tcolor: #79affa !important;\n}\n\n.white .fern-card span {\n\tbackground: white !important;\n}\n\n@media (min-width: 1024px) {\n\t.fern-header-right-menu {\n\t\tdisplay: none !important;\n\t}\n}\n\n.banner {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\ttext-align: center;\n}\n\n.banner p {\n\tmargin-top: .25rem;\n\tmargin-bottom: .25rem;\n}\n\n.banner h1 {\n\tmargin-top: .5rem;\n\tmargin-bottom: 16px;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] {\n\tcolor: white !important;\n}\n\n.fern-sidebar-link-text {\n\tfont-size: 16px !important;\n}\n\n.fern-sidebar-link-container[data-state=active] .fern-sidebar-link-indent:after {\n border: 0px !important;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] .fern-sidebar-link {\n\tbackground-color: #232329 !important;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] .fern-sidebar-link:after {\n\tbackground: linear-gradient(177.85deg, #201CFF -102.27%, #13EF95 101.45%) !important;\n\twidth: 1px !important;\n\tposition: absolute !important;\n\tcontent: \"\" !important;\n\tright: 0 !important;\n\ttop: 0 !important;\n\tbottom: 0 !important;\n\tborder-radius: 8px !important;\n}\n\n.fern-sidebar-link {\n\tborder-radius: 0 !important;\n}\n\n.fern-sidebar-link-content {\n\tpadding-left: 1rem !important;\n\tpadding-right: 1rem !important;\n\tpadding-top: 0.5rem !important;\n\tpadding-bottom: 0.5rem !important;\n}\n\n.fern-sidebar-content {\n\tpadding-left: 0 !important;\n\tpadding-right: 0 !important;\n}\n\n@media (min-width: 1024px) {\n .fern-sidebar-container:not(.fern-sidebar-fixed) {\n padding-left: 0rem !important;\n }\n}\n\n.fern-header-tab-button span {\n\tfont-weight: 700 !important;\n\tfont-size: 16px !important;\n\tline-height: 17.5px !important;\n\tletter-spacing: 2% !important;\n}\n\n.fern-search-bar {\n\t--tw-ring-color: #4E4E52 !important;\n\tbackground-color: #0B0B0C !important;\n}\n\n.fern-sidebar-heading-content,\n.fern-sidebar-link-container .font-semibold .fern-sidebar-link-text {\n\tfont-weight: 700 !important;\n\tfont-size: 14px !important;\n\tline-height: 17.5px !important;\n\tletter-spacing: 2% !important;\n\tcolor: #A1F9D4 !important;\n}\n\n.fern-breadcrumb-item {\n\tcolor: var(--grayscale-a11) !important;\n\tfont-weight: 400 !important;\n}\n\nbutton[role=\"tab\"][data-state=\"active\"] {\n\tbackground-color: #1A1A1F !important;\n}\n\nbutton[role=\"tab\"][data-state=\"active\"]:after {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n\theight: 2px !important;\n\tposition: absolute !important;\n\tcontent: \"\" !important;\n\tright: 0 !important;\n\tleft: 0 !important;\n\tbottom: 0 !important;\n}\n\nbutton[role=\"tab\"] {\n\tbox-shadow: none !important;\n\tposition: relative !important;\n}\n\nbutton[role=\"tab\"]:hover span {\n\tbackground-color: #1A1A1F !important;\n}\n\ndiv[class*=\"callout\"] {\n\tborder-left-width: 2px !important;\n\tborder-color: var(--tw-ring-color) !important;\n}\n\n.fern-search-bar,\n.callout-outlined,\n.fern-card\n.fern-button {\n\tborder-radius: 8px !important;\n}\n\n.bg-tag-default-soft {\n background-color: #28282B !important;\n}\n\n.code-block-root span[style*=\"color: rgb(194, 195, 197);\"] {\n\t--shiki-dark: #949498 !important;\n}\n\n.callout-outlined {\n\tbackground-color: #1D2A34 !important;\n\t--tw-ring-color: #149AFB !important;\n}\n\n.callout-outlined-warning {\n\tbackground-color: #342D1E !important;\n\t--tw-ring-color: #FEC84B !important;\n}\n\n.callout-outlined p,\n.callout-outlined h5,\n.callout-outlined-warning p,\n.callout-outlined-warning h5,\n.callout-outlined-success p,\n.callout-outlined-success h5,\n.callout-outlined-danger p,\n.callout-outlined-danger h5,\n.callout-outlined-info p,\n.callout-outlined-info h5,\n.callout-outlined-tip p,\n.callout-outlined-tip h5,\n.callout-outlined-primary p,\n.callout-outlined-primary h5,\n.callout-outlined-check p,\n.callout-outlined-check h5,\n.callout-outlined-secondary p {\n\tcolor: var(--grayscale-a11) !important;\n}\n\ndiv[class*=\"callout\"] .mt-0\\.5.w-4 {\n\talign-self: center !important;\n}\n\nspan[data-badge-type=\"http-method\"],\nspan[data-badge-type=\"status-code\"] {\n\tborder-radius: 50px !important;\n}\n\n.dg-badge {\n\tmargin-right: 6px !important;\n\tcolor: #bbbbbf !important;\n\tpadding: 1px 1px !important;\n\ttext-decoration: none !important;\n\tborder-radius: 4px !important;\n\tbackground-origin: border-box !important;\n background-image: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: fit-content;\n\theight: fit-content;\n}\n\n.dg-badge span {\n\tbackground-color: #1A1A1F !important;\n\tpadding: 4px 12px !important;\n\tborder-radius: 4px !important;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.dg-badge .fa-icon {\n\tbackground: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%);\n\tmargin-right: 4px !important;\n}\n\n.fern-card {\n\tbackground-color: #0B0B0C !important;\n\tborder-radius: 8px !important;\n}\n\nol li {\n\tmargin-top: 2rem !important;\n}\n\n.small .fern-card {\n\tpadding-bottom: 1rem !important;\n\tpadding-top: 1rem !important;\n}\n\n.small .fern-card .items-start {\n\talign-items: center !important;\n}\n\n.small .fern-card .text-base {\n\tcolor: #BBBBBF !important;\n\tfont-weight: 600 !important;\n}\n\n.fern-card h3 {\n\tmargin-top: 0px !important;\n}\n\n.fern-sidebar-tabs {\n\tpadding-left: 10px !important;\n}\n\n.fern-sidebar-heading {\n\tpadding-left: 28px !important;\n}\n\n.api-playground-call {\n\twidth: fit-content !important;\n\theight: fit-content !important;\n\tdisplay: flex !important;\n\talign-items: center !important;\n\tjustify-content: center !important;\n\tpadding: 1px !important;\n\tborder-radius: 4px !important;\n\tbackground-image: linear-gradient(82.38deg, #ff2eea -99.24%, #4b3cff 99.26%) !important;\n\twidth: 100% !important;\n\tmargin-top: 1rem !important;\n}\n\n.api-playground-call span:first-child {\n\tdisplay: flex !important;\n\talign-items: center !important;\n\tgap: 12px !important;\n\tbackground-color: #1A1A1F !important;\n\tpadding: 4px !important;\n\tborder-radius: 4px !important;\n\twidth: 100% !important;\n\tflex-direction: row !important;\n}\n\n.api-playground-call p {\n\tmargin: 0 !important;\n\tdisplay: flex !important;\n\talign-items: center !important;\n\twhite-space: nowrap !important;\n}\n\n.api-playground-call p div:first-child {\n\tdisplay: inline-flex !important;\n\talign-items: center !important;\n}\n\n.api-playground-call img {\n\twidth: 2.5rem !important;\n\theight: 2.5rem !important;\n\tdisplay: inline-block !important;\n\tmargin-top: 4px !important;\n\tmargin-bottom: 4px !important;\n\ttransform: scaleX(-1) !important;\n}\n\n.invert-white {\n\tfilter: invert(1) !important;\n}\n\n.fa-icon,\n.card-icon {\n\twidth: 2rem !important;\n\theight: 2rem !important;\n}\n\n.dg-badge .fa-icon {\n\twidth: 1rem !important;\n\theight: 1rem !important;\n}\n\n.fern-header,\n.fern-header-tabs {\n\tborder-bottom-width: 0px !important;\n}\n\n.fern-header-tabs-list-item span {\n\tfont-family: 'Roobert' !important;\n}\n\n.fern-header-tabs-list,\n.fern-header-tabs-list-item {\n\theight: 100% !important;\n}\n\n.fern-sidebar-link-indent {\n\tmargin-left: 20px !important;\n}\n\n.fern-sidebar-link-container[data-state=inactive] .fern-sidebar-link:hover {\n\tcolor: #FBFBFF !important;\n}\n\n.t-muted:is(.dark *) {\n\tcolor: #949498 !important;\n}\n\n.dark\\:prose-invert:is(.dark *) {\n\t--tw-prose-headings: #FBFBFF !important;\n\tcolor: #E1E1E5 !important;\n}\n\n.fern-page-heading * {\n\tcolor: #FBFBFF !important;\n}\n\n.badge a {\n\ttext-decoration: none !important;\n\tcolor: unset !important;\n}\n\n.badge svg {\n\tdisplay: none !important;\n}\n\n.dep {\n\tbackground: #bbbbbf !important;\n}\n\n.dep .fa-icon {\n\tbackground: #bbbbbf !important;\n}\n\n.dep span {\n\ttext-decoration: line-through !important;\n}\n\n.pink {\n\tbackground-image: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important;\n}\n\n.pink .fa-icon {\n\tbackground: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important;\n}\n\n#fern-header {\n\tpadding-top: 3rem !important;\n}\n\n.fern-sidebar-container {\n\tposition: sticky !important;\n\ttop: 0 !important;\n margin-top: 10rem !important;\n\toverflow-y: auto !important;\n\tz-index: 20 !important;\n\theight: 100vh !important;\n}\n\n.fern-main {\n\tmargin-top: calc(var(--header-offset, 0) + 3rem) !important;\n}\n\n.fern-endpoint-content-right .fa-icon,\n.fern-dropdown-item .fa-icon {\n\twidth: 1rem !important;\n\theight: 1rem !important;\n}\n\n.fern-endpoint-content {\n\tpadding-top: 3rem !important;\n}\n\n#fern-header {\n\tposition: absolute !important;\n}\n\ndiv[id=\"/reference/speech-to-text-api/listen#request\"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(2) {\n\tdisplay: none !important;\n}\n\ndiv[id=\"/reference/speech-to-text-api/listen#request\"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(1):after {\n\tcontent: \" binary\" !important;\n\tcolor: #949498 !important;\n\tfont-size: .75rem;\n line-height: 1rem;\n\tfont-family: 'Inter' !important;\n\ttext-shadow: 0 1px 3px rgba(0, 0, 0, .4);\n\tmargin-left: .5rem;\n}\n\n#fern-header {\n\tposition: absolute !important;\n}\n\n.fern-sidebar-fixed+.fern-main {\n\tpadding-left: 0px !important;\n}\n\n.api-playground-call a {\n padding-left: 4px !important;\n padding-right: 4px !important;\n color: #79affa !important;\n text-decoration: none !important;\n}\n\n\n*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-inset-x-0{left:0;right:0}.tw-top-0{top:0}.tw-z-30{z-index:30}.tw-mx-auto{margin-left:auto;margin-right:auto}.tw-flex{display:flex}.tw-w-full{width:100%}.tw-max-w-\\[var\\(--spacing-page-width\\)\\]{max-width:var(--spacing-page-width)}.tw-items-center{align-items:center}.tw-justify-end{justify-content:flex-end}.tw-gap-2{gap:.5rem}.tw-gap-3{gap:.75rem}.tw-rounded-md{border-radius:.375rem}.tw-bg-\\[\\#232329\\]{--tw-bg-opacity: 1;background-color:rgb(35 35 41 / var(--tw-bg-opacity))}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-top:.5rem;padding-bottom:.5rem}.tw-text-\\[\\#BBBBBF\\]{--tw-text-opacity: 1;color:rgb(187 187 191 / var(--tw-text-opacity))}.tw-backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#fern-header a{font-size:16px!important;font-family:Inter,sans-serif!important}@media (min-width: 768px){.md\\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1024px){.lg\\:tw-px-8{padding-left:2rem;padding-right:2rem}}\n\n","featureFlagsConfig":{}},"__N_SSG":true},"page":"/static/[domain]/[[...slug]]","query":{"domain":"developers.deepgram.com","slug":["docs","transcribe-recorded-calls-with-twilio"]},"buildId":"jigMgAOOAbh4GA_fJkAR-","assetPrefix":"https://app.ferndocs.com","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[58494,47191,22055,98508,37110,7575],"gsp":true,"scriptLoader":[]}</script></body></html>