@@ -162,7 +162,7 @@ const run = async () => {
162
162
for (const result of contentSafetyLabels .results ) {
163
163
console .log (result .text );
164
164
console .log (
165
- ` Timestamp: ${result .timestamp .start } - ${result .timestamp .end } ` ,
165
+ ` Timestamp: ${result .timestamp .start } - ${result .timestamp .end } `
166
166
);
167
167
168
168
// Get category, confidence, and severity
@@ -173,25 +173,25 @@ const run = async () => {
173
173
174
174
// Get the confidence of the most common labels in relation to the entire audio file
175
175
for (const [label, confidence] of Object .entries (
176
- contentSafetyLabels .summary ,
176
+ contentSafetyLabels .summary
177
177
)) {
178
178
console .log (
179
- ` ${confidence * 100 }% confident that the audio contains ${label } ` ,
179
+ ` ${confidence * 100 }% confident that the audio contains ${label } `
180
180
);
181
181
}
182
182
183
183
// Get the overall severity of the most common labels in relation to the entire audio file
184
184
for (const [label, severity_confidence] of Object .entries (
185
- contentSafetyLabels .severity_score_summary ,
185
+ contentSafetyLabels .severity_score_summary
186
186
)) {
187
187
console .log (
188
- ` ${severity_confidence .low * 100 }% confident that the audio contains low-severity ${label } ` ,
188
+ ` ${severity_confidence .low * 100 }% confident that the audio contains low-severity ${label } `
189
189
);
190
190
console .log (
191
- ` ${severity_confidence .medium * 100 }% confident that the audio contains medium-severity ${label } ` ,
191
+ ` ${severity_confidence .medium * 100 }% confident that the audio contains medium-severity ${label } `
192
192
);
193
193
console .log (
194
- ` ${severity_confidence .high * 100 }% confident that the audio contains high-severity ${label } ` ,
194
+ ` ${severity_confidence .high * 100 }% confident that the audio contains high-severity ${label } `
195
195
);
196
196
}
197
197
};
@@ -244,7 +244,7 @@ while (true) {
244
244
for (const result of contentSafetyLabels .results ) {
245
245
console .log (result .text );
246
246
console .log (
247
- ` Timestamp: ${result .timestamp .start } - ${result .timestamp .end } ` ,
247
+ ` Timestamp: ${result .timestamp .start } - ${result .timestamp .end } `
248
248
);
249
249
250
250
// Get category, confidence, and severity.
@@ -254,24 +254,24 @@ while (true) {
254
254
}
255
255
// Get the confidence of the most common labels in relation to the entire audio file
256
256
for (const [label, confidence] of Object .entries (
257
- contentSafetyLabels .summary ,
257
+ contentSafetyLabels .summary
258
258
)) {
259
259
console .log (
260
- ` ${confidence * 100 }% confident that the audio contains ${label } ` ,
260
+ ` ${confidence * 100 }% confident that the audio contains ${label } `
261
261
);
262
262
}
263
263
// Get the confidence of the most common labels in relation to the entire audio file.
264
264
for (const [label, severity_confidence] of Object .entries (
265
- contentSafetyLabels .severity_score_summary ,
265
+ contentSafetyLabels .severity_score_summary
266
266
)) {
267
267
console .log (
268
- ` ${severity_confidence .low * 100 }% confident that the audio contains low-severity ${label } ` ,
268
+ ` ${severity_confidence .low * 100 }% confident that the audio contains low-severity ${label } `
269
269
);
270
270
console .log (
271
- ` ${severity_confidence .medium * 100 }% confident that the audio contains medium-severity ${label } ` ,
271
+ ` ${severity_confidence .medium * 100 }% confident that the audio contains medium-severity ${label } `
272
272
);
273
273
console .log (
274
- ` ${severity_confidence .high * 100 }% confident that the audio contains high-severity ${label } ` ,
274
+ ` ${severity_confidence .high * 100 }% confident that the audio contains high-severity ${label } `
275
275
);
276
276
}
277
277
0 commit comments