├── .eslintrc.json
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── config.yml
│ └── feature-request.md
├── PULL_REQUEST_TEMPLATE
│ └── pull_request_template.md
├── dependabot.yml
└── workflows
│ └── release.yml
├── .gitignore
├── .releaserc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── KNOWN_ISSUES.md
├── LICENSE
├── README.md
├── app
├── api
│ ├── authenticate
│ │ └── route.ts
│ ├── generate-token
│ │ └── route.ts
│ └── verify-token
│ │ └── route.ts
├── components
│ ├── AgentControls.tsx
│ ├── ChatBubble.tsx
│ ├── ConversationAgent.tsx
│ ├── DgSvg.tsx
│ ├── Headphones.tsx
│ ├── InitialLoadAgent.tsx
│ ├── MessageAudio.tsx
│ ├── MessageHeader.tsx
│ ├── RightBubble.tsx
│ ├── TextContext.tsx
│ ├── UserAvatar.tsx
│ └── icons
│ │ ├── BoltIcon.tsx
│ │ ├── CaretIcon.tsx
│ │ ├── CogIcon.tsx
│ │ ├── DownloadIcon.tsx
│ │ ├── ExclamationIcon.tsx
│ │ ├── FacebookIcon.tsx
│ │ ├── LinkedInIcon.tsx
│ │ ├── MicrophoneIcon.tsx
│ │ ├── SendIcon.tsx
│ │ └── XIcon.tsx
├── config
│ └── index.ts
├── context
│ ├── Auth.tsx
│ ├── Toast.tsx
│ └── WebSocketContext.tsx
├── favicon.ico
├── fonts
│ ├── ABCFavorit-Bold.otf
│ ├── ABCFavorit-Bold.woff
│ └── ABCFavorit-Bold.woff2
├── globals.css
├── layout.tsx
├── lib
│ ├── authMiddleware.ts
│ ├── constants.ts
│ ├── helpers.ts
│ ├── jwt.ts
│ └── types.ts
├── opengraph-image.png
├── page.tsx
└── recording.svg
├── commitlint.config.js
├── deepgram.toml
├── middleware.ts
├── next.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── aura-2-thalia-en.svg
├── aura-angus-en.svg
├── aura-arcas-en.svg
├── aura-asteria-en.svg
├── aura-athena-en.svg
├── aura-helios-en.svg
├── aura-hera-en.svg
├── aura-luna-en.svg
├── aura-orion-en.svg
├── aura-orpheus-en.svg
├── aura-perseus-en.svg
├── aura-stella-en.svg
├── aura-zeus-en.svg
├── bg.svg
├── deepgram.svg
├── dg.png
├── dg.svg
├── emily.md
├── headphones.svg
├── old.svg
└── user-icon.svg
├── sample.env.local
├── tailwind.config.ts
└── tsconfig.json
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Something is occurring that I think is wrong
4 | title: ''
5 | labels: "\U0001F41B bug"
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## What is the current behavior?
11 |
12 | > What's happening that seems wrong?
13 |
14 | ## Steps to reproduce
15 |
16 | > To make it faster to diagnose the root problem. Tell us how can we reproduce the bug.
17 |
18 | ## Expected behavior
19 |
20 | > What would you expect to happen when following the steps above?
21 |
22 | ## Please tell us about your environment
23 |
24 | > We want to make sure the problem isn't specific to your operating system or programming language.
25 |
26 | - **Operating System/Version:** Windows 10
27 | - **Language:** [all | TypeScript | Python | PHP | etc]
28 | - **Browser:** Chrome
29 |
30 | ## Other information
31 |
32 | > Anything else we should know? (e.g. detailed explanation, stack-traces, related issues, suggestions how to fix, links for us to have context, eg. stack overflow, codepen, etc)
33 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Deepgram Developer Community
4 | url: https://github.com/orgs/deepgram/discussions
5 | - name: Deepgram on Twitter
6 | url: https://twitter.com/DeepgramAI
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: I think X would be a cool addition or change.
4 | title: ''
5 | labels: "✨ enhancement"
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Proposed changes
11 |
12 | > Provide a detailed description of the change or addition you are proposing
13 |
14 | ## Context
15 |
16 | > Why is this change important to you? How would you use it? How can it benefit other users?
17 |
18 | ## Possible Implementation
19 |
20 | > Not obligatory, but suggest an idea for implementing addition or change
21 |
22 | ## Other information
23 |
24 | > Anything else we should know? (e.g. detailed explanation, related issues, links for us to have context, eg. stack overflow, codepen, etc)
25 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Proposed changes
2 |
3 | Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
4 |
5 | ## Types of changes
6 |
7 | What types of changes does your code introduce to the Vonage for Visual Studio Code extension?
8 | _Put an `x` in the boxes that apply_
9 |
10 | - [ ] Bugfix (non-breaking change which fixes an issue)
11 | - [ ] New feature (non-breaking change which adds functionality)
12 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13 | - [ ] Documentation update or tests (if none of the other choices apply)
14 |
15 | ## Checklist
16 |
17 | _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
18 |
19 | - [ ] I have read the [CONTRIBUTING](../../CONTRIBUTING.md) doc
20 | - [ ] Lint and unit tests pass locally with my changes
21 | - [ ] I have added tests that prove my fix is effective or that my feature works
22 | - [ ] I have added necessary documentation (if appropriate)
23 | - [ ] Any dependent changes have been merged and published in downstream modules
24 |
25 | ## Further comments
26 |
27 | If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
28 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for more information:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 | # https://containers.dev/guide/dependabot
6 |
7 | version: 2
8 | updates:
9 | - package-ecosystem: "devcontainers"
10 | directory: "/"
11 | schedule:
12 | interval: weekly
13 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | - "next/**"
8 | - "rc/**"
9 | - "beta/**"
10 | - "alpha/**"
11 | workflow_dispatch:
12 |
13 | jobs:
14 | release:
15 | name: Release / Node ${{ matrix.node }}
16 | strategy:
17 | matrix:
18 | node: ["20"]
19 |
20 | runs-on: ubuntu-latest
21 |
22 | permissions:
23 | contents: write
24 |
25 | steps:
26 | - uses: actions/checkout@v2
27 |
28 | - name: Set up Node
29 | uses: actions/setup-node@v2
30 | with:
31 | node-version: ${{ matrix.node }}
32 |
33 | - run: |
34 | npm ci
35 |
36 | - name: Create a release
37 | run: npx semantic-release
38 | env:
39 | GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
40 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
38 |
39 | # Contentlayer
40 | .contentlayer
41 |
42 | # vscode
43 | .vscode
44 |
45 | # container
46 | .devcontainer
47 |
48 | # pycharm
49 | .idea
50 |
--------------------------------------------------------------------------------
/.releaserc.json:
--------------------------------------------------------------------------------
1 | {
2 | "branches": [
3 | { "name": "main" },
4 | { "name": "next", "channel": "next", "prerelease": true },
5 | { "name": "rc", "channel": "rc", "prerelease": true },
6 | { "name": "beta", "channel": "beta", "prerelease": true },
7 | { "name": "alpha", "channel": "alpha", "prerelease": true }
8 | ],
9 | "tagFormat": "${version}",
10 | "plugins": [
11 | "@semantic-release/commit-analyzer",
12 | "@semantic-release/release-notes-generator",
13 | [
14 | "@semantic-release/npm",
15 | {
16 | "npmPublish": false
17 | }
18 | ],
19 | [
20 | "@semantic-release/changelog",
21 | {
22 | "changelogFile": "CHANGELOG.md",
23 | "changelogTitle": "Change Log"
24 | }
25 | ],
26 | [
27 | "@semantic-release/git",
28 | {
29 | "assets": ["package.json", "CHANGELOG.md"]
30 | }
31 | ],
32 | "@semantic-release/github"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | Change Log
2 |
3 | # [0.4.0](https://github.com/deepgram-devs/deepgram-conversational-demo/compare/0.3.0...0.4.0) (2024-05-05)
4 |
5 |
6 | ### Features
7 |
8 | * options stored in memory, responsiveness, input ([#31](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/31)) ([7e26d79](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/7e26d794a67ce1ba38db0ac12762a13dfc5c1c81))
9 |
10 | # [0.3.0](https://github.com/deepgram-devs/deepgram-conversational-demo/compare/0.2.0...0.3.0) (2024-04-21)
11 |
12 |
13 | ### Bug Fixes
14 |
15 | * fix failsafe repeats ([5f9b25b](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/5f9b25b25cf73f184cd1e7396cf6769a16760d66))
16 | * potential fix for connection dropping - cannot repo on dev ([05f5e93](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/05f5e9330bfa7722f7ab7fc47ba0488e4d75f367))
17 |
18 |
19 | ### Features
20 |
21 | * add cache control settings so the API key response is no longer cached ([fa50b57](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/fa50b57efa6e4e035df36106c7ac5d37eedb9f27))
22 | * add in cors for the API auth route ([8056fbf](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/8056fbff661ebb4d39d1d6806423b456527a5544))
23 |
24 | ## [0.2.1](https://github.com/deepgram-devs/deepgram-conversational-demo/compare/0.2.0...0.2.1) (2024-04-12)
25 |
26 |
27 | ### Bug Fixes
28 |
29 | * fix failsafe repeats ([5f9b25b](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/5f9b25b25cf73f184cd1e7396cf6769a16760d66))
30 | * potential fix for connection dropping - cannot repo on dev ([05f5e93](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/05f5e9330bfa7722f7ab7fc47ba0488e4d75f367))
31 |
32 | # [0.2.0](https://github.com/deepgram-devs/deepgram-conversational-demo/compare/0.1.0...0.2.0) (2024-04-12)
33 |
34 |
35 | ### Bug Fixes
36 |
37 | * better look of github stars button ([e67f35a](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/e67f35aa33515885d7cc18e8b78f498585627179))
38 | * Fix LCP of app ([#30](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/30)) ([c02cb1c](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/c02cb1c03af48855a1002554855e4b8cf795463c))
39 |
40 |
41 | ### Features
42 |
43 | * Using local VAD concept ([#26](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/26)) ([69d2514](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/69d251474b674668cbc13e52d59e0445ad4a313f)), closes [#28](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/28)
44 |
45 | # [0.1.0](https://github.com/deepgram-devs/deepgram-conversational-demo/compare/0.0.33...0.1.0) (2024-03-14)
46 |
47 | ### Bug Fixes
48 |
49 | - limit toast to 1 ([745df35](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/745df356870b4e46e06041e11adca6b113b0eb80))
50 | - remove un-speechable character ([620a085](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/620a085c0bdb7e70c674be8053d7775049a2c442))
51 |
52 | ### Features
53 |
54 | - improve latency output ([8717682](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/8717682e096e9dfb3ae6abcea2a39e70b9934035))
55 | - introduce audio element instead of dom record for audio playback ([#23](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/23)) ([72941bf](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/72941bf628562248794dbee1be0868caf97394a6))
56 | - introduce failsafe for uncaptured utterance ([#22](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/22)) ([8ae14d5](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/8ae14d5af013964e56e9d951488d74eb26a276ea))
57 | - replace code link with stars count button and link ([26853d6](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/26853d687a6467a90676a9b4c47a1510ac7e535b))
58 | - update readme ([544aa1b](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/544aa1b3ea85d1c842fb3248b4311a86c5d4f3c4))
59 | - updating copy ([#25](https://github.com/deepgram-devs/deepgram-conversational-demo/issues/25)) ([43748e7](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/43748e71624ae373785cdfc1d561722243ed79c7))
60 | - welcome and prompt tweaks ([a50f1e6](https://github.com/deepgram-devs/deepgram-conversational-demo/commit/a50f1e68cc2a040c773321821dcd901012531c4d))
61 |
62 | # 0.0.33 (2024-03-07)
63 |
64 | ### Features
65 |
66 | - Michelle llm prompt (#21) ([eb8bffd](https://bitbucket.org/projects/test/repos/my-project/commits/eb8bffd7a6080cdbf0dd388544c7a99c98441979))
67 | - remove STT latency stub for now ([327bab7](https://bitbucket.org/projects/test/repos/my-project/commits/327bab7080bc9d3c7ffe1dd1f2d1e47848ad8b07))
68 |
69 | # 0.0.32 (2024-03-06)
70 |
71 | ### Features
72 |
73 | - fixing toast output, switching back to gpt-3.5-turbo-0125 ([2f0c108](https://bitbucket.org/projects/test/repos/my-project/commits/2f0c108927c1c202e07a404e6393989153baf273))
74 |
75 | # 0.0.31 (2024-03-06)
76 |
77 | ### Features
78 |
79 | - tweaking the TTS input script mid-request ([b312db8](https://bitbucket.org/projects/test/repos/my-project/commits/b312db8813ef042b83c85e5cd28cda8fb64c93f6))
80 |
81 | # 0.0.30 (2024-03-06)
82 |
83 | ### Features
84 |
85 | - remove chance for two websocket connections to open - introduce toast ([100b781](https://bitbucket.org/projects/test/repos/my-project/commits/100b7819034a029cf8b1fa7ab302a4b803def876))
86 |
87 | # 0.0.29 (2024-03-06)
88 |
89 | ### Bug Fixes
90 |
91 | - build issues ([f6fd30a](https://bitbucket.org/projects/test/repos/my-project/commits/f6fd30adb6776032c0b8a71f6c6bf91611d18fcf))
92 |
93 | # 0.0.28 (2024-03-06)
94 |
95 | ### Bug Fixes
96 |
97 | - firefox would still have zerobyte data in queue, closing connection ([0dfbe3a](https://bitbucket.org/projects/test/repos/my-project/commits/0dfbe3a31c1bbf00ace4072bb7bc11b26c7de820))
98 |
99 | # 0.0.27 (2024-03-06)
100 |
101 | ### Features
102 |
103 | - rearchitect deepgram connection into context ([67f0fe0](https://bitbucket.org/projects/test/repos/my-project/commits/67f0fe0dc88fe888f407e1e9dc6b388c1cbc7229))
104 |
105 | # 0.0.26 (2024-03-05)
106 |
107 | ### Features
108 |
109 | - fix welcome message to be less... funky ([ef0fc68](https://bitbucket.org/projects/test/repos/my-project/commits/ef0fc68d0f33b3fd60e94d9080c89222b85458de))
110 | - mute microphone when window visibility changes to !==visible ([c523108](https://bitbucket.org/projects/test/repos/my-project/commits/c523108cbbbb8dc10c65542ef3a0156e18d29fcf))
111 |
112 | ### Bug Fixes
113 |
114 | - rerunning connection creation when every context changed was breaking events ([ae726f4](https://bitbucket.org/projects/test/repos/my-project/commits/ae726f412e24ac4722db52f752352437ceabd095))
115 | - always add a speech_final transcript to the array, but trim the concat audio for the utterance space joining ([f5c483c](https://bitbucket.org/projects/test/repos/my-project/commits/f5c483cbb669cafef95d12afab4ec17740f50680))
116 | - don't request an API key when there is a connection or existing key ([7df0b2a](https://bitbucket.org/projects/test/repos/my-project/commits/7df0b2a446cd0adb5abe492691867168b06ca2d7))
117 | - resolve incomplete-is-final errors ([22a5474](https://bitbucket.org/projects/test/repos/my-project/commits/22a54749e338c0968bf2824c3e16787882d45438))
118 |
119 | ### Chores
120 |
121 | - updating known issues ([7fdc875](https://bitbucket.org/projects/test/repos/my-project/commits/7fdc8759f2dbda646eb618f469b46f01a2c4cfe2))
122 |
123 | # 0.0.25 (2024-03-05)
124 |
125 | ### Features
126 |
127 | - edit controls design ([4a67a18](https://bitbucket.org/projects/test/repos/my-project/commits/4a67a18f1461389d8010f0295292e9adc2d685c6))
128 | - context driven voice model ([b3537ab](https://bitbucket.org/projects/test/repos/my-project/commits/b3537ab80dc7debe96bada7b1d3e49fdd404d444))
129 | - show voice avatars ([e21454d](https://bitbucket.org/projects/test/repos/my-project/commits/e21454d5c4c28a5058abc291923d972117fee9a8))
130 | - add voice selection menu ([1b790dd](https://bitbucket.org/projects/test/repos/my-project/commits/1b790dd8af29fec8c5901056478738f8878d71dd))
131 | - add accent and language to model selection ([0803c8c](https://bitbucket.org/projects/test/repos/my-project/commits/0803c8c341dd02fde4dfaa4d96df0827f2368a3b))
132 | - use product icons on launchpage ([eee7b23](https://bitbucket.org/projects/test/repos/my-project/commits/eee7b230370607fede453191cf7c5e9cf774a9c8))
133 | - remove product icons in favour of green bullets ([91caa7f](https://bitbucket.org/projects/test/repos/my-project/commits/91caa7fdee0e3837dc0b257e66f4c4cb7df6805d))
134 | - tweak bullets ([b466a14](https://bitbucket.org/projects/test/repos/my-project/commits/b466a14574dd49c1facd4496010195185f5ce928))
135 |
136 | # 0.0.24 (2024-03-05)
137 |
138 | ### Features
139 |
140 | - add real network latency for tts ([5a03391](https://bitbucket.org/projects/test/repos/my-project/commits/5a03391b28ad56762744403ce454288f558e1a7d))
141 |
142 | # 0.0.23 (2024-03-05)
143 |
144 | ### Features
145 |
146 | - add settings button, remove flowbite ([931348e](https://bitbucket.org/projects/test/repos/my-project/commits/931348ec4514426d7fef0d902b9366fa7346f8f6))
147 |
148 | # 0.0.22 (2024-03-05)
149 |
150 | ### Features
151 |
152 | - download transcript button ([0c8f78d](https://bitbucket.org/projects/test/repos/my-project/commits/0c8f78d7f329d3c7dd73bd79e038c9d6114a2138))
153 |
154 | ### Bug Fixes
155 |
156 | - fixing social url ([1a33173](https://bitbucket.org/projects/test/repos/my-project/commits/1a33173f13ab57e4676974455c62187a03f9a844))
157 | - of course the vercel_url env param doesn't have a protocol... ([aff2d15](https://bitbucket.org/projects/test/repos/my-project/commits/aff2d15c4c8af4eb487e154c43469651e9e86c95))
158 | - hard fix for metadata baseurl ([43eee55](https://bitbucket.org/projects/test/repos/my-project/commits/43eee5503e1fcd0bd1b51d19540a4448b40b7a0a))
159 | - typos in prompt ([3bd3725](https://bitbucket.org/projects/test/repos/my-project/commits/3bd372554a5e685aee3f8097942774b906223c30))
160 |
161 | ### Chores
162 |
163 | - add new issue to known_issues ([752d420](https://bitbucket.org/projects/test/repos/my-project/commits/752d42081a7afec261cc8efa7325d2fae16b95bd))
164 |
165 | # 0.0.21 (2024-03-04)
166 |
167 | ### Bug Fixes
168 |
169 | - fixing bits ([2631a9e](https://bitbucket.org/projects/test/repos/my-project/commits/2631a9e7cf3a56e75b41bbfa84ec637946672b10))
170 |
171 | # 0.0.20 (2024-03-04)
172 |
173 | ### Bug Fixes
174 |
175 | - use black bg behind black bg image ([c769d8b](https://bitbucket.org/projects/test/repos/my-project/commits/c769d8b7b3b7e87adb60c03d047e45b739bb4380))
176 |
177 | # 0.0.19 (2024-03-04)
178 |
179 | ### Features
180 |
181 | - text tweaks ([ebba538](https://bitbucket.org/projects/test/repos/my-project/commits/ebba538141813dd68a7ccb31b3d4d7116511e2ec))
182 |
183 | # 0.0.18 (2024-03-04)
184 |
185 | ### Features
186 |
187 | - mobile ux tweaks ([95f5fd2](https://bitbucket.org/projects/test/repos/my-project/commits/95f5fd2ac7c501f69c0572dc978fcbf86e5f4d06))
188 |
189 | # 0.0.17 (2024-03-04)
190 |
191 | ### Features
192 |
193 | - TTS/LLM latency visible ([d4d0b24](https://bitbucket.org/projects/test/repos/my-project/commits/d4d0b246971168c34a8e38a9dcd9a787606ae2d2))
194 | - add bolt icon to metadata ([1fe299c](https://bitbucket.org/projects/test/repos/my-project/commits/1fe299cd76aa7193e666d6c0e1f067fc7cf6a49d))
195 | - changing stuff ([d6cfa05](https://bitbucket.org/projects/test/repos/my-project/commits/d6cfa05db4c45359b0cfe896be609c2fc2f9a78f))
196 | - endpoint tuning ([d2a11bf](https://bitbucket.org/projects/test/repos/my-project/commits/d2a11bf59d51ae6ba372779d448e0edd3c82ce4b))
197 | - metadata, share icons ([9751355](https://bitbucket.org/projects/test/repos/my-project/commits/97513555df3786bef285a9edfea34e6cfd710a01))
198 | - contextual greeting ([82a6462](https://bitbucket.org/projects/test/repos/my-project/commits/82a64627e2f09d2c5eab15b14cbfcdf8f14323c3))
199 |
200 | # 0.0.16 (2024-03-04)
201 |
202 | ### Features
203 |
204 | - add message metadata to it's own context ([8c7eba7](https://bitbucket.org/projects/test/repos/my-project/commits/8c7eba7a1a1fc9f6ec447feb0b0af10f00b856b7))
205 |
206 | ### Bug Fixes
207 |
208 | - nudge logo up 1px ([4036c88](https://bitbucket.org/projects/test/repos/my-project/commits/4036c88e1f998951e7bbcb3a987e3e5e4971b48d))
209 | - tweak logo positioning and font ([d5b55f0](https://bitbucket.org/projects/test/repos/my-project/commits/d5b55f02083a5bdcb913dc4d120e6bd6c032fbc8))
210 | - tweaking welcome message contrast ([d200106](https://bitbucket.org/projects/test/repos/my-project/commits/d200106460d473ac33e204ff89b3c8a0846b4e43))
211 |
212 | ### Chores
213 |
214 | - move exclamation icon tsx file to icons folder ([a92efe0](https://bitbucket.org/projects/test/repos/my-project/commits/a92efe0101e801bd4a0fcda2971ba4d070f4ea55))
215 |
216 | # 0.0.15 (2024-03-04)
217 |
218 | ### Features
219 |
220 | - some layout changes, fullstory added ([eb7bf3b](https://bitbucket.org/projects/test/repos/my-project/commits/eb7bf3bf686b402dac7a9a6fa2558400ef2c292a))
221 | - tweaking latency display ([3a12535](https://bitbucket.org/projects/test/repos/my-project/commits/3a12535c038e3b6a3e95cc0a9a9e30ab18c8ce50))
222 | - chat bubble latency ([73153ea](https://bitbucket.org/projects/test/repos/my-project/commits/73153ea154662e4ad2145a1fe2b658d392359246))
223 |
224 | # 0.0.14 (2024-03-04)
225 |
226 | ### Features
227 |
228 | - flesh out dynamic greetings ([0ef489b](https://bitbucket.org/projects/test/repos/my-project/commits/0ef489b6398f084f10d9e5e6e6b345b32d60c170))
229 | - use TTS for welcome message ([c74f4f6](https://bitbucket.org/projects/test/repos/my-project/commits/c74f4f65af61c9c78915552a47a960933f8fdedd))
230 |
231 | ### Chores
232 |
233 | - smol tweaks ([2993a98](https://bitbucket.org/projects/test/repos/my-project/commits/2993a98902dd45dfb13ad57cc7393e21dab6f897))
234 | - add link to known issues ([bff88a1](https://bitbucket.org/projects/test/repos/my-project/commits/bff88a19acf028a7d81d5308da896629b26d9291))
235 |
236 | # 0.0.13 (2024-03-04)
237 |
238 | ### Bug Fixes
239 |
240 | - use deepgram favicon on demo ([dc48e2c](https://bitbucket.org/projects/test/repos/my-project/commits/dc48e2c07528c43f06c4ea00c6f8c143b6f98a21))
241 | - Delay after unmuting the microphone for a second time (#16) ([6b54ce3](https://bitbucket.org/projects/test/repos/my-project/commits/6b54ce3b8073d6b7ee6ee0b898951503b9e8060a))
242 |
243 | ### Chores
244 |
245 | - add opengraph/metadata to known issues ([db73eef](https://bitbucket.org/projects/test/repos/my-project/commits/db73eefcb5540ff86491a292dddc36032b445c4a))
246 | - add roleplay prompt injection protection to the known issue list ([6a36785](https://bitbucket.org/projects/test/repos/my-project/commits/6a367855f5d6d19bc3d5fc399a85620d8e6e70b8))
247 | - update known issues file for issues links ([be9ff46](https://bitbucket.org/projects/test/repos/my-project/commits/be9ff46e5f2c95e4e17a1ffed4901869627c131e))
248 | - readme update and community files (#13) ([629cd2f](https://bitbucket.org/projects/test/repos/my-project/commits/629cd2f8316e9eb0256e919c3395263cfbb166e3))
249 | - update known issues ([d246613](https://bitbucket.org/projects/test/repos/my-project/commits/d24661341fbddee43889d1441c15ae4c14668d35))
250 |
251 | # 0.0.12 (2024-02-29)
252 |
253 | ### Features
254 |
255 | - add iOS disabled audio playback notice on launchpage ([8da9351](https://bitbucket.org/projects/test/repos/my-project/commits/8da93513febe891003ec9b69d16bc598cbc4cbba))
256 |
257 | ### Bug Fixes
258 |
259 | - switch headphone icon to SVG ([569ef92](https://bitbucket.org/projects/test/repos/my-project/commits/569ef92494ba66b87496ec597612327e899a4cb7))
260 |
261 | ### Chores
262 |
263 | - add favicon issue to known issues ([a11c9c3](https://bitbucket.org/projects/test/repos/my-project/commits/a11c9c390cad6bd9b03e7de2ff0f679b241a15df))
264 | - add headphone icon to known issues ([0658872](https://bitbucket.org/projects/test/repos/my-project/commits/06588725b381ed49cc21d2bf38bca6c4dabd1371))
265 | - add need for mobile ux tweaks to known issues ([cf1a86e](https://bitbucket.org/projects/test/repos/my-project/commits/cf1a86e23f65a72f8a51ee77245259ea18efdaf8))
266 |
267 | # 0.0.11 (2024-02-29)
268 |
269 | ### Features
270 |
271 | - avoid one word answers in the prompt ([85ae601](https://bitbucket.org/projects/test/repos/my-project/commits/85ae60102f7d431e62a70a2cae002d4d713d38de))
272 | - update sample environment variable ([c3f0ee0](https://bitbucket.org/projects/test/repos/my-project/commits/c3f0ee00aea7577dea0cafcdadb6f8b315a470b6))
273 | - fix disappearing button on mobile launchpage ([4e946fc](https://bitbucket.org/projects/test/repos/my-project/commits/4e946fcf3592c954bcd56677a7b3b84a8c2b3acc))
274 |
275 | ### Chores
276 |
277 | - update KNOWN_ISSUES.md with more thoughts ([0aa9136](https://bitbucket.org/projects/test/repos/my-project/commits/0aa91362fbfac85e4fc8f9393b3fc2966e103406))
278 |
279 | # 0.0.10 (2024-02-29)
280 |
281 | ### Features
282 |
283 | - unedge the TTS api route ([b905161](https://bitbucket.org/projects/test/repos/my-project/commits/b905161773dd3dfd5b4291d7b5540d567e4dbe82))
284 |
285 | # 0.0.9 (2024-02-29)
286 |
287 | ### Features
288 |
289 | - change colour of message metadata line ([4a2ac6c](https://bitbucket.org/projects/test/repos/my-project/commits/4a2ac6cac3a80d970c15378edacb67c9f0a75446))
290 | - avatar tweaks, barge-in works, update prompt ([c426341](https://bitbucket.org/projects/test/repos/my-project/commits/c426341a2edb41507b2b8f76f7ccf552f0106992))
291 | - switching over to production values ([5a3ea5b](https://bitbucket.org/projects/test/repos/my-project/commits/5a3ea5b5d63106cfce7c6eea191cc06006504ae3))
292 | - update user avatar ([af324e4](https://bitbucket.org/projects/test/repos/my-project/commits/af324e4acd0738ad8bc7e1e11634537613112c1c))
293 | - add CTA buttons in the header ([6205b35](https://bitbucket.org/projects/test/repos/my-project/commits/6205b352304dca1de70aed2b9b8155e349298490))
294 | - add headphones message ([8427a42](https://bitbucket.org/projects/test/repos/my-project/commits/8427a426ad09ce4445fd1d8ecb79010b4a06187d))
295 | - better loading/connecting messages ([9b4e011](https://bitbucket.org/projects/test/repos/my-project/commits/9b4e0117bc896ceb6711a0e47c10d3e967d0d577))
296 | - ux tweaks, better messages, styling ([a9d7117](https://bitbucket.org/projects/test/repos/my-project/commits/a9d711790b50201c21d4b4732ff88a5c76684173))
297 | - add GTM for analytics ([92734c4](https://bitbucket.org/projects/test/repos/my-project/commits/92734c4b56c134deca1de5ee2a012b9879b84ca9))
298 | - add heap analytics ([913049f](https://bitbucket.org/projects/test/repos/my-project/commits/913049f112af66dc093178e07ae4b8fd71ca6dcf))
299 | - switch to console heap project ([1741b70](https://bitbucket.org/projects/test/repos/my-project/commits/1741b70eb140ef176d82341ebe8b2678a19257c3))
300 | - tweak splash screen for readability ([36155aa](https://bitbucket.org/projects/test/repos/my-project/commits/36155aa9eb0349187e46a87392bbcd71dbe23527))
301 | - tweak splash screen for UX ([b6e3fc0](https://bitbucket.org/projects/test/repos/my-project/commits/b6e3fc007bea761c02d2f0f663c984a79baf5c5d))
302 |
303 | # 0.0.8 (2024-02-29)
304 |
305 | ### Features
306 |
307 | - remove local VAD attempts ([47815ca](https://bitbucket.org/projects/test/repos/my-project/commits/47815ca4ac0bbf87188fef7dfcd959e5d05229ff))
308 |
309 | # 0.0.7 (2024-02-29)
310 |
311 | ### Features
312 |
313 | - working audio queue and server-side latency ([0f8937f](https://bitbucket.org/projects/test/repos/my-project/commits/0f8937f52bd3a8349f03a2347804c0c8f8022b95))
314 | - major rebuild of nowplaying and audio queue to use contexts ([f41498d](https://bitbucket.org/projects/test/repos/my-project/commits/f41498dc69d1bc22501300bc86acf50d2e28692f))
315 | - disable audio control button ([bddade1](https://bitbucket.org/projects/test/repos/my-project/commits/bddade19752fcc3323a4bdb7d057aa04fdb684bf))
316 | - TTS latency display included ([9e74cb0](https://bitbucket.org/projects/test/repos/my-project/commits/9e74cb0d36c1bdeba6c88f8675dd20786b2b1e4f))
317 | - audio controls plugged in ([f71dc32](https://bitbucket.org/projects/test/repos/my-project/commits/f71dc320bc0ffba9f51a8f4ef6fdac4ed37c199c))
318 |
319 | ### Chores
320 |
321 | - removed debug outline ([cdf6270](https://bitbucket.org/projects/test/repos/my-project/commits/cdf62703ae2f277f753860c4653735bf41fb2216))
322 |
323 | # 0.0.6 (2024-02-28)
324 |
325 | ### Features
326 |
327 | - add welcome message to audio queue ([fe3c608](https://bitbucket.org/projects/test/repos/my-project/commits/fe3c60838bbe7ec22f1d31370f4c0505223eeba2))
328 | - tweak design and audio controls ([a47c14c](https://bitbucket.org/projects/test/repos/my-project/commits/a47c14c80a60d30c94ef3e13684e1bddc389fb62))
329 |
330 | ### Chore
331 |
332 | - remove some logging ([73442a1](https://bitbucket.org/projects/test/repos/my-project/commits/73442a111493688e0815a7f26e9c0796954eb2ce))
333 |
334 | # 0.0.5 (2024-02-28)
335 |
336 | ### Features
337 |
338 | - minor tweaks ([a99eb42](https://bitbucket.org/projects/test/repos/my-project/commits/a99eb42b3deb9c630d38109954c592d6f3a849ed))
339 | - requeue messages ([3b04f46](https://bitbucket.org/projects/test/repos/my-project/commits/3b04f46c1c99950e4b00739b955eac21bbbb2d12))
340 | - plug LLM response back into TTS ([d9fbbdd](https://bitbucket.org/projects/test/repos/my-project/commits/d9fbbddc2ef16a6ad76deb2f22905e6dc4a21dcf))
341 | - audio plays from queue ([9993720](https://bitbucket.org/projects/test/repos/my-project/commits/99937205ed113ae87cee632fed53c6aaf25e38a6))
342 |
343 | # 0.0.4 (2024-02-21)
344 |
345 | ### Features
346 |
347 | - playback TTS response in the browser ([e42f551](https://bitbucket.org/projects/test/repos/my-project/commits/e42f551d801737fe80e4330481e428ca25782776))
348 | - support streaming response from TTS server ([eb8c97a](https://bitbucket.org/projects/test/repos/my-project/commits/eb8c97a271d9c8f0e48eb5b4afad1c6aef80948d))
349 | - moving TTS playback control button ([2d65cf7](https://bitbucket.org/projects/test/repos/my-project/commits/2d65cf7d769250d0e81e087a1efc07a3f2a32ebf))
350 | - add unsent text queue - queue all the things ([71add80](https://bitbucket.org/projects/test/repos/my-project/commits/71add808ff84186447bca5d4942118d087819ad6))
351 |
352 | # 0.0.3 (2024-02-16)
353 |
354 | ### Features
355 |
356 | - overhaul controls ([e8436c8](https://bitbucket.org/projects/test/repos/my-project/commits/e8436c8af56fd0bcf0d9b1ae17963668a8a9e94e))
357 | - fixing stuff ([b4e1853](https://bitbucket.org/projects/test/repos/my-project/commits/b4e18530041f8ea1d2cedff11511d6da3569ae5e))
358 | - remove guard ([aae419d](https://bitbucket.org/projects/test/repos/my-project/commits/aae419d27505b8498c8c1f651f4a7f008959d11a))
359 | - remove edge from core page ([6c2e221](https://bitbucket.org/projects/test/repos/my-project/commits/6c2e2214f09a373ebf79af1727a900e24408b497))
360 | - edge build ([7684598](https://bitbucket.org/projects/test/repos/my-project/commits/7684598daaa04de523230066c4b78f26685c3d88))
361 |
362 | ### Bug Fixes
363 |
364 | - renaming component cases ([9e0e112](https://bitbucket.org/projects/test/repos/my-project/commits/9e0e112f1a8c9afdbaa0139bd27c6112e6f72f7d))
365 | - fix casing problems ([00ef060](https://bitbucket.org/projects/test/repos/my-project/commits/00ef060ae672377b95d63d42f2425f9d5f845d09))
366 |
367 | ### Chores
368 |
369 | - use component aliases ([ab5fa9b](https://bitbucket.org/projects/test/repos/my-project/commits/ab5fa9b6ea4930cf4fa83a43eecedae752178325))
370 |
371 | # 0.0.2 (2024-02-16)
372 |
373 | ### Features
374 |
375 | - llm integrated into chatbot ([ce13e56](https://bitbucket.org/projects/test/repos/my-project/commits/ce13e564d872d642f797d19636b77cf246a28f56))
376 |
377 | ### Bug Fixes
378 |
379 | - fix callback deps ([f28bde8](https://bitbucket.org/projects/test/repos/my-project/commits/f28bde83793f4b44d7174e5c6d5e4a1803a02aeb))
380 | - update deepgram transcription options ([b620eaf](https://bitbucket.org/projects/test/repos/my-project/commits/b620eaff635277691f92f9cca2137766d8228e36))
381 | - fix background on mobile ([10e5901](https://bitbucket.org/projects/test/repos/my-project/commits/10e59013ded39eb1a7edaeb468a0658f9b112b39))
382 |
383 | ### Chores
384 |
385 | - llm initial setup ([7d23b1a](https://bitbucket.org/projects/test/repos/my-project/commits/7d23b1a862178482f86a3fe634658ba7d5872b3a))
386 |
387 | # 0.0.1 (2024-02-11)
388 |
389 | ### Features
390 |
391 | - adding greeting, initial state, key events ([c8308d3](https://bitbucket.org/projects/test/repos/my-project/commits/c8308d343f4f5a2db182206d1db7f64544c8b005))
392 | - add text entry for conversation (but only when mic is disabled) ([e68833c](https://bitbucket.org/projects/test/repos/my-project/commits/e68833cbbe27c250dd8d3854e13aea2bc12b0795))
393 | - tidy up before next big bit ([d67e2b2](https://bitbucket.org/projects/test/repos/my-project/commits/d67e2b2e1c0953991b87c7d422a92cd1af8ef798))
394 | - better volume interaction ([d80849a](https://bitbucket.org/projects/test/repos/my-project/commits/d80849a0f892607fabb1195b8164c58b7c1275cf))
395 | - window scrolls to bottom smoothly as messages come in ([217b32e](https://bitbucket.org/projects/test/repos/my-project/commits/217b32e6c87af4b41e9d922f9b21cd8e2ed9b298))
396 | - introduce client-side VAD ([8e16fe5](https://bitbucket.org/projects/test/repos/my-project/commits/8e16fe5e49f360ceab880c8c1cf76633256f9d9e))
397 | - simplify vad events ([2b78439](https://bitbucket.org/projects/test/repos/my-project/commits/2b7843956de43dae3a4f6268f999b42c9916366e))
398 |
399 | ### Chores
400 |
401 | - pre-LLM request improvements ([8f48453](https://bitbucket.org/projects/test/repos/my-project/commits/8f4845359cce717db167789ace599f509ee06652))
402 | - transient changes ([9bf74be](https://bitbucket.org/projects/test/repos/my-project/commits/9bf74be35b616e3e1bddcda454c869c4fedf031a))
403 | - tidy up ([02f0772](https://bitbucket.org/projects/test/repos/my-project/commits/02f0772acdfeed1e1583f209e0becd17baed7619))
404 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | The Deepgram developer community is filled with amazing, clever and creative people, and we're excited for you to join us. Our goal is to create safe and inclusive spaces, have meaningful conversations, and explore ways to make sure that every voice is heard and understood.
4 |
5 | #### Being a Good Community Member
6 |
7 | Because we prioritize creating a safe space for our members, we believe in actively working on how we, as individuals, can ensure a positive community environment through our own actions and mindsets.
8 |
9 | Every supportive community starts with each member. We feel it’s important to be open to others, respectful, and supportive. As part of the Deepgram community, please begin by thinking carefully about and agreeing with the following statements:
10 |
11 | - I will be welcoming to everyone at the table;
12 | - I will be patient and open to learning from everyone around me;
13 | - I will treat everyone with respect, because they deserve it;
14 | - I will be mindful of the needs and boundaries of others;
15 |
16 | We strive to create a space where we learn and grow together. Here are some other key things you can do to make the community great:
17 |
18 | ### BE HUMBLE
19 |
20 | People come from all different places, and it’s best not to make assumptions about what they think or feel. Approach others with curiosity and openness. We **all** have a lot to learn from each other.
21 |
22 | ### BE HELPFUL
23 |
24 | If someone asks for help, consider jumping in. You don’t have to be an expert to talk through a problem, suggest a resource, or help find a solution. We all have something to contribute.
25 |
26 | ### ENCOURAGE OTHERS
27 |
28 | There’s no one path to have a career in technology or to this community. Let’s engage others in ways that create opportunities for learning and fun for all of us.
29 |
30 | ## Our Pledge
31 |
32 | Everyone who participates in our community must agree to abide by our Code of Conduct. By agreeing, you help create a welcoming, respectful, and friendly community based on respect and trust. We are committed to creating a harassment-free community.
33 |
34 | These rules will be strictly enforced in any and all of our official spaces, including direct messages, social media, and physical and virtual events. Everyone who participates in these spaces is required to agree to this community code. We also ask and expect community members to observe these rules anywhere the community is meeting (for example, online chats on unofficial platforms or event after-parties).
35 |
36 | ## Our Standards
37 |
38 | ### BE RESPECTFUL
39 |
40 | Exercise consideration and respect in your speech and actions. Be willing to accept and give feedback gracefully.
41 |
42 | Don’t make offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, ethnicity, immigration status, religion, experience level, socioeconomic status, nationality, or other identity markers.
43 |
44 | Additionally, don’t insult or demean others. This includes making unwelcome comments about a person’s lifestyle choices and practices, including things related to diet, health, parenting, drugs, or employment. It’s not okay to insult or demean others if it’s "just a joke."
45 |
46 | ### BE WELCOMING AND OPEN
47 |
48 | Encourage others, be supportive and willing to listen, and be willing to learn from others’ perspectives and experiences. Lead with empathy and kindness.
49 |
50 | Don’t engage in gatekeeping behaviors, like questioning the intelligence or knowledge of others as a way to prove their credentials. And don’t exclude people for prejudicial reasons.
51 |
52 | ### RESPECT PRIVACY
53 |
54 | Do not publish private communications without consent. Additionally, never disclose private aspects of a person’s personal identity without consent, except as necessary to protect them from intentional abuse.
55 |
56 | ### RESPECT PERSONAL BOUNDARIES
57 |
58 | Do not introduce gratuitous or off-topic sexual images, languages, or behavior in spaces where they are not appropriate. Never make physical contact or simulated physical contact without consent or after a request to stop. Additionally, do not continue to message others about anything if they ask you to stop or leave them alone.
59 |
60 | #### BE A GOOD NEIGHBOR
61 |
62 | Contribute to the community in a positive and thoughtful way. Consider what’s best for the overall community. Do not make threats of violence, intimidate others, incite violence or intimidation against others, incite self-harm, stalk, follow, or otherwise harass others. Be mindful of your surroundings and of your fellow participants.
63 |
64 | Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
65 |
66 | # Additional rules for online spaces
67 |
68 | For Deepgram’s official online spaces, like our YouTube & Twitch chats, we have some additional rules. Any of the following behaviors can result in a ban without warning.
69 |
70 | ### DON'T SPAM
71 |
72 | Don't spam. We'll ban you.
73 |
74 | ### KEEP IT LEGAL
75 |
76 | If it’s illegal, it’s not allowed on our websites or in our online spaces. Please don’t share links to pirated material or other nefarious things.
77 |
78 | ### NO TROLLING
79 |
80 | Please be earnest. Don’t use excessive sarcasm to annoy or undermine other people. And don’t bait them with bad faith comments or abuse.
81 |
82 | ### PORNOGRAPHY AND OTHER NSFW STUFF
83 |
84 | Please don’t post it or link to it. It doesn’t belong in our online spaces.
85 |
86 | ### FOUL AND GRAPHIC LANGUAGE
87 |
88 | Please do not use excessive curse words. Additionally, do not use graphic sexual or violent language — again, think of our spaces as places for people of all ages.
89 |
90 | # Enforcement & Reporting
91 |
92 | If you are being harassed by a member of the Deepgram developer community, if you observe someone else being harassed, or you experience actions or behaviors that are contrary to our Code of Conduct, please report the behavior by contacting our team at [devrel@deepgram.com](mailto:devrel@deepgram.com).
93 |
94 | ## Enforcement Guidelines
95 |
96 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
97 |
98 | ### 1. Correction
99 |
100 | **_Community Impact:_** Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
101 |
102 | **_Consequence:_** A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
103 |
104 | ### 2. Warning
105 |
106 | **_Community Impact:_** A violation through a single incident or series of actions.
107 |
108 | **_Consequence:_** A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
109 |
110 | ### 3. Temporary Ban
111 |
112 | **_Community Impact:_** A serious violation of community standards, including sustained inappropriate behavior.
113 |
114 | **_Consequence:_** A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
115 |
116 | ### 4. Permanent Ban
117 |
118 | **_Community Impact:_** Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
119 |
120 | **_Consequence:_** A permanent ban from any sort of public interaction within the community.
121 |
122 | # Attribution
123 |
124 | This Code of Conduct is adapted from:
125 |
126 | - Contributor Covenant, version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct
127 | - https://eventhandler.community/conduct/, which itself is inspired by Quest, who in turn provides credit to Scripto, the #botALLY Code of Conduct, the LGBTQ in Tech code of Conduct, and the XOXO Code of Conduct.
128 |
129 | Community Impact Guidelines, which were copied from InnerSource Commons, were inspired by Mozilla’s code of conduct enforcement ladder.
130 |
131 | For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
132 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | Want to contribute to this project? We ❤️ it!
4 |
5 | Here are a few types of contributions that we would be interested in hearing about.
6 |
7 | - Bug fixes
8 | - If you find a bug, please first report it using Github Issues.
9 | - Issues that have already been identified as a bug will be labeled `🐛 bug`.
10 | - If you'd like to submit a fix for a bug, send a Pull Request from your own fork and mention the Issue number.
11 | - Include a test that isolates the bug and verifies that it was fixed.
12 | - New Features
13 | - If you'd like to accomplish something in the extension that it doesn't already do, describe the problem in a new Github Issue.
14 | - Issues that have been identified as a feature request will be labeled `✨ enhancement`.
15 | - If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending
16 | too much time writing the code. In some cases, `✨ enhancement`s may not align well with the project objectives at
17 | the time.
18 | - Tests, Documentation, Miscellaneous
19 | - If you think the test coverage could be improved, the documentation could be clearer, you've got an alternative
20 | implementation of something that may have more advantages, or any other change we would still be glad hear about
21 | it.
22 | - If its a trivial change, go ahead and send a Pull Request with the changes you have in mind
23 | - If not, open a Github Issue to discuss the idea first.
24 | - Snippets
25 | - To add snippets:
26 | - Add a directory in the `snippets` folder with the name of the language.
27 | - Add one or more files in the language directory with snippets.
28 | - Update the `package.json` to include the snippets you added.
29 |
30 | We also welcome anyone to work on any existing issues with the `👋🏽 good first issue` tag.
31 |
32 | ## Requirements
33 |
34 | For a contribution to be accepted:
35 |
36 | - The test suite must be complete and pass
37 | - Code must follow existing styling conventions
38 | - Commit messages must be descriptive. Related issues should be mentioned by number.
39 |
40 | If the contribution doesn't meet these criteria, a maintainer will discuss it with you on the Issue. You can still
41 | continue to add more commits to the branch you have sent the Pull Request from.
42 |
43 | ## How To
44 |
45 | 1. Fork this repository on GitHub.
46 | 1. Clone/fetch your fork to your local development machine.
47 | 1. Create a new branch (e.g. `issue-12`, `feat.add_foo`, etc) and check it out.
48 | 1. Make your changes and commit them. (Did the tests pass? No linting errors?)
49 | 1. Push your new branch to your fork. (e.g. `git push myname issue-12`)
50 | 1. Open a Pull Request from your new branch to the original fork's `main` branch.
51 |
--------------------------------------------------------------------------------
/KNOWN_ISSUES.md:
--------------------------------------------------------------------------------
1 | # Known Issues
2 |
3 | This is a list of known issues. For the latest list of all issues see the [Github Issues page](https://github.com/deepgram-devs/deepgram-conversational-demo/issues).
4 |
5 | ## iOS Autoplay Issues
6 |
7 | Seems to be a very well-known issue with iOS devices. Apple requires a user event to play audio in the browser - basically.
8 |
9 | A possible fix is to use the launchpage click to start the app to play a zero-audio mp3 file, and change the context of that audio object when playing audio from the queue.
10 |
11 | See: https://matt-harrison.com/posts/web-audio/
12 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/4
13 |
14 | ## Echocancellation doesn't always work in Chrome/Chromium browsers
15 |
16 | Caused by a user not using peer-devices. Here is the ticket: https://bugs.chromium.org/p/chromium/issues/detail?id=687574 It basically says that the echo cancellation only works for audio that is coming from a peer connection. As soon as it is processed locally by the Web Audio API it will not be considered anymore by the echo cancellation.
17 |
18 | Possible fix is to go ahead and volume-down the playback when you start speaking. This will improve the barge-in experience, and possibly duck the playback under the microphones' decibel threshold so it doesn't pick itself up.
19 |
20 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/5
21 |
22 | ## ErrorContextProvider should also handle system messages and warnings
23 |
24 | Rename ErrorContextProvider to be a general toast message handler.
25 |
26 | See: https://tailwindui.com/components/application-ui/overlays/notifications
27 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/6
28 |
29 | ## Errors added to ErrorContextProvider do not display
30 |
31 | We have not plugged ANY errors into the ErrorContextProvider yet.
32 |
33 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/7
34 |
35 | ## Request errors should retry up to X times
36 |
37 | Request errors should retry (and display notice when "taking longer than usual" using the ErrorContextProvider)
38 |
39 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/8
40 |
41 | ## Chunking TTS request and return stream from serverless function
42 |
43 | We'd like to be able to start the TTS response earlier. We have chunking logic for JavaScript, so we want to buffer the TTS input as a stream, clear the buffer into individual TTS requests, and combine the responses into a single response stream.
44 |
45 | See: https://www.npmjs.com/package/multistream
46 | Issue: https://github.com/deepgram-devs/deepgram-conversational-demo/issues/12
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Deepgram
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Deepgram AI Agent Technical Demo
2 |
3 | Combine Text-to-Speech and Speech-to-Text into a conversational agent.
4 |
5 | > Project codename EmilyAI
6 |
7 | [](https://discord.gg/xWRaCDBtW4)
8 |
9 | The purpose of this demo is to showcase how you can build a Conversational AI application that engages users in natural language interactions, mimicking human conversation through natural language processing using [Deepgram](https://deepgram.com/).
10 |
11 | Examples of where you would see this type of application include: virtual assistants for tasks like answering queries and controlling smart devices, educational tutors for personalized learning, healthcare advisors for medical information, and entertainment chat bots for engaging conversations and games.
12 |
13 | These applications aim to enhance user experiences by offering efficient and intuitive interactions, reducing the need for human intervention in various tasks and services.
14 |
15 | ## Issue Reporting
16 |
17 | If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker.
18 |
19 | Check out our [KNOWN ISSUES](./KNOWN_ISSUES.md) before reporting.
20 |
21 | ## Demo features
22 |
23 | - Capture streaming audio using [Deepgram Streaming Speech to Text](https://developers.deepgram.com/docs/getting-started-with-live-streaming-audio).
24 | - Natural Language responses using an OpenAI LLM.
25 | - Speech to Text conversion using [Deepgram Aura Text to Speech](https://developers.deepgram.com/docs/text-to-speech).
26 |
27 | ## What is Deepgram?
28 |
29 | [Deepgram](https://deepgram.com/) is a foundational AI company providing speech-to-text and language understanding capabilities to make data readable and actionable by human or machines.
30 |
31 | ## Sign-up to Deepgram
32 |
33 | Want to start building using this project? [Sign-up now for Deepgram and create an API key](https://console.deepgram.com/signup?jump=keys).
34 |
35 | ## Quickstart
36 |
37 | ### Manual
38 |
39 | Follow these steps to get started with this starter application.
40 |
41 | #### Clone the repository
42 |
43 | Go to GitHub and [clone the repository](https://github.com/deepgram-starters/live-nextjs-starter).
44 |
45 | #### Install dependencies
46 |
47 | Install the project dependencies.
48 |
49 | ```bash
50 | npm install
51 | ```
52 |
53 | #### Edit the config file
54 |
55 | Copy the code from `sample.env.local` and create a new file called `.env.local`.
56 |
57 | ```bash
58 | DEEPGRAM_STT_DOMAIN=https://api.deepgram.com
59 | DEEPGRAM_API_KEY=YOUR-DG-API-KEY
60 | OPENAI_API_KEY=YOUR-OPENAI-API-KEY
61 | ```
62 |
63 | 1. For `DEEPGRAM_API_KEY` paste in the key you generated in the [Deepgram console](https://console.deepgram.com/).
64 | 2. Set `DEEPGRAM_STT_DOMAIN` to be `https://api.deepgram.com`.
65 | 3. `OPENAI_API_KEY` should be an OpenAI API Key that can access the chat completions API.
66 |
67 | #### Run the application
68 |
69 | Once running, you can [access the application in your browser](http://localhost:3000).
70 |
71 | ```bash
72 | npm run dev
73 | ```
74 |
75 | ## Getting Help
76 |
77 | We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
78 |
79 | - [Open an issue in this repository](https://github.com/deepgram-devs/deepgram-aura-tts-demo/issues)
80 | - [Join the Deepgram Github Discussions Community](https://github.com/orgs/deepgram/discussions)
81 | - [Join the Deepgram Discord Community](https://discord.gg/xWRaCDBtW4)
82 |
83 | ## Author
84 |
85 | [Deepgram](https://deepgram.com)
86 |
87 | ## License
88 |
89 | This project is licensed under the MIT license. See the [LICENSE](./LICENSE) file for more info.
90 |
--------------------------------------------------------------------------------
/app/api/authenticate/route.ts:
--------------------------------------------------------------------------------
1 | import { config } from "@/app/config";
2 | import { verifyJWT } from "@/app/lib/authMiddleware";
3 | import { DeepgramError, createClient } from "@deepgram/sdk";
4 | import { NextResponse, type NextRequest } from "next/server";
5 |
6 | export const revalidate = 0;
7 |
8 | export async function GET(request: NextRequest) {
9 | // verify jwt token
10 | const authResponse = verifyJWT(request);
11 | if (authResponse.status !== 200) {
12 | return authResponse;
13 | }
14 |
15 | // exit early so we don't request 70000000 keys while in devmode
16 | if (process.env.DEEPGRAM_ENV === "development") {
17 | return NextResponse.json({
18 | key: config.deepGramApiKey ?? "",
19 | });
20 | }
21 |
22 | // gotta use the request object to invalidate the cache every request :vomit:
23 | const url = request.url;
24 | const deepgram = createClient(config.deepGramApiKey ?? "");
25 |
26 | let { result: projectsResult, error: projectsError } =
27 | await deepgram.manage.getProjects();
28 |
29 | if (projectsError) {
30 | return NextResponse.json(projectsError);
31 | }
32 |
33 | const project = projectsResult?.projects[0];
34 |
35 | if (!project) {
36 | return NextResponse.json(
37 | new DeepgramError(
38 | "Cannot find a Deepgram project. Please create a project first."
39 | )
40 | );
41 | }
42 |
43 | let { result: newKeyResult, error: newKeyError } =
44 | await deepgram.manage.createProjectKey(project.project_id, {
45 | comment: "Temporary API key",
46 | scopes: ["usage:write"],
47 | tags: ["next.js"],
48 | time_to_live_in_seconds: 60,
49 | });
50 |
51 | if (newKeyError) {
52 | return NextResponse.json(newKeyError);
53 | }
54 |
55 | const response = NextResponse.json({ ...newKeyResult, url });
56 | response.headers.set("Surrogate-Control", "no-store");
57 | response.headers.set(
58 | "Cache-Control",
59 | "s-maxage=0, no-store, no-cache, must-revalidate, proxy-revalidate"
60 | );
61 | response.headers.set("Expires", "0");
62 |
63 | return response;
64 | }
65 |
--------------------------------------------------------------------------------
/app/api/generate-token/route.ts:
--------------------------------------------------------------------------------
1 | import { generateToken } from "@/app/lib/jwt";
2 | import { NextResponse } from "next/server";
3 |
4 | export async function POST() {
5 | const payload = { role: "anonymous" + Date.now() };
6 |
7 | const token = generateToken(payload);
8 | return NextResponse.json({ token });
9 | }
10 |
--------------------------------------------------------------------------------
/app/api/verify-token/route.ts:
--------------------------------------------------------------------------------
1 | import { verifyJWT } from "@/app/lib/authMiddleware";
2 | import { NextRequest } from "next/server";
3 |
4 | export async function GET(req: NextRequest) {
5 | // verify jwt token
6 | const authResponse = verifyJWT(req);
7 | verifyJWT;
8 | if (authResponse.status !== 200) {
9 | return authResponse;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/components/AgentControls.tsx:
--------------------------------------------------------------------------------
1 | import { Tooltip } from "@nextui-org/react";
2 | import { useCallback } from "react";
3 | import { MicrophoneIcon } from "./icons/MicrophoneIcon";
4 | import { useWebSocketContext } from "../context/WebSocketContext";
5 |
6 | export const AgentSettings = () => {
7 | return (
8 | <>
9 |