+
diff --git a/src/features/providers.tsx b/src/features/providers.tsx
index ff3224b19..1f72a6e9b 100644
--- a/src/features/providers.tsx
+++ b/src/features/providers.tsx
@@ -1,12 +1,18 @@
"use client";
import { SessionProvider } from "next-auth/react";
+import { SpeechProvider } from "./chat/chat-speech/speech-context";
+import { GlobalMessageProvider } from "./global-message/global-message-context";
import { MenuProvider } from "./menu/menu-context";
export const Providers = ({ children }: { children: React.ReactNode }) => {
return (
- {children}
+
+
+ {children}
+
+
);
};
diff --git a/src/package-lock.json b/src/package-lock.json
index 6b49ec1b1..781357b63 100644
--- a/src/package-lock.json
+++ b/src/package-lock.json
@@ -8,7 +8,7 @@
"name": "azure-open-ai-accelerator",
"version": "0.1.0",
"dependencies": {
- "@azure/ai-form-recognizer": "^4.1.0-beta.1",
+ "@azure/ai-form-recognizer": "^5.0.0",
"@azure/cosmos": "^3.17.3",
"@azure/identity": "^3.2.4",
"@radix-ui/react-avatar": "^1.0.3",
@@ -29,6 +29,7 @@
"eslint-config-next": "^13.4.12",
"langchain": "^0.0.123",
"lucide-react": "^0.264.0",
+ "microsoft-cognitiveservices-speech-sdk": "^1.32.0",
"nanoid": "^4.0.2",
"next": "^13.5.3",
"next-auth": "^4.22.4",
@@ -113,9 +114,9 @@
}
},
"node_modules/@azure/ai-form-recognizer": {
- "version": "4.1.0-beta.1",
- "resolved": "https://registry.npmjs.org/@azure/ai-form-recognizer/-/ai-form-recognizer-4.1.0-beta.1.tgz",
- "integrity": "sha512-p2MdiP8kGLZGpvN/DnKdsMW+rKpXPmivp164ZYCAibaoC0MAqxY3JdQeZY8mgseQ9CuJ97qOFsvxPke7dOxpCg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@azure/ai-form-recognizer/-/ai-form-recognizer-5.0.0.tgz",
+ "integrity": "sha512-emWirkH87Oj5adkHBxcOUwxPhRxWL/lV1Kjo+0ujhZZ7J9CTruDbKvxWRihknDt55iEml3Qov2yTykpUtPWN2g==",
"dependencies": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.3.0",
@@ -2251,6 +2252,27 @@
}
]
},
+ "node_modules/bent": {
+ "version": "7.3.12",
+ "resolved": "https://registry.npmjs.org/bent/-/bent-7.3.12.tgz",
+ "integrity": "sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==",
+ "dependencies": {
+ "bytesish": "^0.4.1",
+ "caseless": "~0.12.0",
+ "is-stream": "^2.0.0"
+ }
+ },
+ "node_modules/bent/node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/big-integer": {
"version": "1.6.51",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
@@ -2364,6 +2386,11 @@
"node": ">=10.16.0"
}
},
+ "node_modules/bytesish": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/bytesish/-/bytesish-0.4.4.tgz",
+ "integrity": "sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ=="
+ },
"node_modules/call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
@@ -2422,6 +2449,11 @@
}
]
},
+ "node_modules/caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="
+ },
"node_modules/ccount": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
@@ -5994,6 +6026,50 @@
"node": ">=8.6"
}
},
+ "node_modules/microsoft-cognitiveservices-speech-sdk": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/microsoft-cognitiveservices-speech-sdk/-/microsoft-cognitiveservices-speech-sdk-1.32.0.tgz",
+ "integrity": "sha512-TQqCIytCvW7x8MB2UT8DfyZkIjO34CSpy0zYlbQChkYWrYNzGgMIAA3uTGuYGj8hb0xMQBwRfqyAc5sA2VRgjQ==",
+ "dependencies": {
+ "agent-base": "^6.0.1",
+ "bent": "^7.3.12",
+ "https-proxy-agent": "^4.0.0",
+ "uuid": "^9.0.0",
+ "ws": "^7.5.6"
+ }
+ },
+ "node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/https-proxy-agent": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz",
+ "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==",
+ "dependencies": {
+ "agent-base": "5",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/https-proxy-agent/node_modules/agent-base": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
+ "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==",
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -8643,6 +8719,26 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
+ "node_modules/ws": {
+ "version": "7.5.9",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
+ "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
diff --git a/src/package.json b/src/package.json
index 74d38260c..de7dca943 100644
--- a/src/package.json
+++ b/src/package.json
@@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
- "@azure/ai-form-recognizer": "^4.1.0-beta.1",
+ "@azure/ai-form-recognizer": "^5.0.0",
"@azure/cosmos": "^3.17.3",
"@azure/identity": "^3.2.4",
"@radix-ui/react-avatar": "^1.0.3",
@@ -30,6 +30,7 @@
"eslint-config-next": "^13.4.12",
"langchain": "^0.0.123",
"lucide-react": "^0.264.0",
+ "microsoft-cognitiveservices-speech-sdk": "^1.32.0",
"nanoid": "^4.0.2",
"next": "^13.5.3",
"next-auth": "^4.22.4",
diff --git a/src/type.ts b/src/type.ts
index a70764712..175553759 100644
--- a/src/type.ts
+++ b/src/type.ts
@@ -21,7 +21,9 @@ const azureEnvVars = [
"NEXTAUTH_URL",
"AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT",
"AZURE_DOCUMENT_INTELLIGENCE_KEY",
- "ADMIN_EMAIL_ADDRESS"
+ "ADMIN_EMAIL_ADDRESS",
+ "AZURE_SPEECH_REGION",
+ "AZURE_SPEECH_KEY",
] as const;
type RequiredServerEnvKeys = (typeof azureEnvVars)[number];