Skip to content

Commit

Permalink
Merge pull request Sunbird-ALL#152 from ajinkyapandetekdi/all-1.2-tn-dev
Browse files Browse the repository at this point in the history
Issueid #225896 feat: Enable Audio Upload on Test-Rig
  • Loading branch information
gouravmore authored Aug 28, 2024
2 parents 7a72887 + d4b8ad1 commit 6bdd934
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/config/awsS3.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// import { S3Client } from '@aws-sdk/client-s3';
import { S3Client } from "@aws-sdk/client-s3";

// export default new S3Client({
// region: process.env.REACT_APP_AWS_S3_REGION,
// credentials: {
// accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID,
// secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY,
// },
// });
export default new S3Client({
region: process.env.REACT_APP_AWS_S3_REGION,
credentials: {
accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY,
},
});
5 changes: 3 additions & 2 deletions src/utils/VoiceAnalyser.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import {
} from "./constants";
import config from "./urlConstants.json";
import { filterBadWords } from "./Badwords";
// import S3Client from '../config/awsS3';
import S3Client from "../config/awsS3";
import { PutObjectCommand } from "@aws-sdk/client-s3";
/* eslint-disable */

const AudioPath = {
Expand Down Expand Up @@ -363,7 +364,7 @@ function VoiceAnalyser(props) {

// TODO: Remove false when REACT_APP_AWS_S3_BUCKET_NAME and keys added
var audioFileName = "";
if (process.env.REACT_APP_CAPTURE_AUDIO === "true" && false) {
if (process.env.REACT_APP_CAPTURE_AUDIO === "true") {
let getContentId = currentLine;
audioFileName = `${
process.env.REACT_APP_CHANNEL
Expand Down

0 comments on commit 6bdd934

Please sign in to comment.