Skip to content

Commit 31761e3

Browse files
committed
edit
1 parent ed7d1a2 commit 31761e3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

articles/ai-services/openai/includes/text-to-speech-javascript.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,11 @@ Your app's _package.json_ file will be updated with the dependencies.
108108

109109

110110

111-
#### [TypeScript (Microsoft Entra Id)](#tab/typescript-keyless)
111+
#### [TypeScript (Microsoft Entra ID)](#tab/typescript-keyless)
112112

113113
1. Create a new file named _Text-to-speech.ts_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.ts_ file:
114114

115115
```typescript
116-
import "dotenv/config";
117116
import { writeFile } from "fs/promises";
118117
import { AzureOpenAI } from "openai";
119118
import { DefaultAzureCredential, getBearerTokenProvider } from "@azure/identity";
@@ -185,12 +184,11 @@ Your app's _package.json_ file will be updated with the dependencies.
185184
```console
186185
node Text-to-speech.js
187186
```
188-
#### [JavaScript (Microsoft Entra Id)](#tab/javascript-keyless)
187+
#### [JavaScript (Microsoft Entra ID)](#tab/javascript-keyless)
189188

190189
1. Create a new file named _Text-to-speech.js_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.js_ file:
191190

192191
```javascript
193-
require("dotenv/config");
194192
const { writeFile } = require("fs/promises");
195193
const { AzureOpenAI } = require("openai");
196194
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");
@@ -260,7 +258,6 @@ Your app's _package.json_ file will be updated with the dependencies.
260258
1. Create a new file named _Text-to-speech.ts_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.ts_ file:
261259

262260
```typescript
263-
import "dotenv/config";
264261
import { writeFile } from "fs/promises";
265262
import { AzureOpenAI } from "openai";
266263
import type { SpeechCreateParams } from "openai/resources/audio/speech";
@@ -333,7 +330,6 @@ Your app's _package.json_ file will be updated with the dependencies.
333330
1. Create a new file named _Text-to-speech.js_ and open it in your preferred code editor. Copy the following code into the _Text-to-speech.js_ file:
334331

335332
```javascript
336-
require("dotenv/config");
337333
const { writeFile } = require("fs/promises");
338334
const { AzureOpenAI } = require("openai");
339335
require("openai/shims/node");

0 commit comments

Comments
 (0)