Skip to content

Commit

Permalink
updates audio transcription
Browse files Browse the repository at this point in the history
  • Loading branch information
aniturza committed Jan 10, 2024
1 parent af1313e commit 39fe12b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/AIHub/Controllers/AudioTranscriptionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public async Task<IActionResult> UploadFile(IFormFile imageFile, string prompt)
if (CheckNullValues(imageFile))
{
ViewBag.Message = "You must upload an image";
return View("FormAnalyzer");
return View("AudioTranscription");
}

//Upload file to azure storage account
Expand All @@ -203,7 +203,7 @@ public async Task<IActionResult> UploadFile(IFormFile imageFile, string prompt)


//Call EvaluateImage with the url
await AnalyzeForm(blobUrl.ToString(), prompt);
await TranscribeAudio(blobUrl.ToString(), prompt);
ViewBag.Waiting = null;

return View("AudioTranscription", model);
Expand Down
10 changes: 5 additions & 5 deletions src/AIHub/Views/AudioTranscription/AudioTranscription.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
ViewData["Title"] = "Form Analyzer";
ViewData["Title"] = "Audio Trancription";
}

<div class="text-center">
Expand All @@ -8,9 +8,9 @@
<path
d="M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z" />
</svg>
<h1 class="sectionTitle">Form Analyzer</h1>
<p class="sectionSubTitle">Analiza tus documentos usando GPT4 y Azure Document Intelligence.</p>
<p class="sectionDetails">Sólo necesitas adjuntar un documento (.pdf).</p>
<h1 class="sectionTitle">Audio Trancription</h1>
<p class="sectionSubTitle">Analiza tus audios usando Azure Speech Service</p>
<p class="sectionDetails">Sólo necesitas subir un audio (.mp3).</p>

</div>

Expand All @@ -29,7 +29,7 @@
</div>
</div>
}
<form asp-controller="FormAnalyzer" asp-action="UploadFile" method="post" enctype="multipart/form-data">
<form asp-controller="AudioTranscription" asp-action="UploadFile" method="post" enctype="multipart/form-data">
@* <div class="row justify-content-center mt-5">
<span class="form-group">
<label for="fname">Upload your image to analyze:</label><br>
Expand Down
2 changes: 1 addition & 1 deletion src/AIHub/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</a>
</li>
<li key="callcenter">
<li key="audiotranscription">
<a asp-area="" style="text-decoration: none" asp-controller="AudioTranscription" asp-action="AudioTranscription">
<div class="homeBlock">
<svg style="fill: var(--main-color)" xmlns="http://www.w3.org/2000/svg" height="2em"
Expand Down
2 changes: 1 addition & 1 deletion src/AIHub/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</li>
<li class="nav-item">
<a class="nav-link" style="color: var(--layout-text-color);" asp-area="" asp-controller="AudioTranscription"
asp-action="AudioTranscription">Audio Transcription<svg xmlns="http://www.w3.org/2000/svg" height="1.25em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @@fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><style>svg{fill: var(--layout-text-color)}</style><path d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zm2 226.3c37.1 22.4 62 63.1 62 109.7s-24.9 87.3-62 109.7c-7.6 4.6-17.4 2.1-22-5.4s-2.1-17.4 5.4-22C269.4 401.5 288 370.9 288 336s-18.6-65.5-46.5-82.3c-7.6-4.6-10-14.4-5.4-22s14.4-10 22-5.4zm-91.9 30.9c6 2.5 9.9 8.3 9.9 14.8V400c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L113.4 376H80c-8.8 0-16-7.2-16-16V312c0-8.8 7.2-16 16-16h33.4l35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5zm51 34.9c6.6-5.9 16.7-5.3 22.6 1.3C249.8 304.6 256 319.6 256 336s-6.2 31.4-16.3 42.7c-5.9 6.6-16 7.1-22.6 1.3s-7.1-16-1.3-22.6c5.1-5.7 8.1-13.1 8.1-21.3s-3.1-15.7-8.1-21.3c-5.9-6.6-5.3-16.7 1.3-22.6z"/></svg></a>
asp-action="AudioTranscription">Audio Transcription <svg xmlns="http://www.w3.org/2000/svg" height="1.25em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @@fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><style>svg{fill: var(--layout-text-color)}</style><path d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zm2 226.3c37.1 22.4 62 63.1 62 109.7s-24.9 87.3-62 109.7c-7.6 4.6-17.4 2.1-22-5.4s-2.1-17.4 5.4-22C269.4 401.5 288 370.9 288 336s-18.6-65.5-46.5-82.3c-7.6-4.6-10-14.4-5.4-22s14.4-10 22-5.4zm-91.9 30.9c6 2.5 9.9 8.3 9.9 14.8V400c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L113.4 376H80c-8.8 0-16-7.2-16-16V312c0-8.8 7.2-16 16-16h33.4l35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5zm51 34.9c6.6-5.9 16.7-5.3 22.6 1.3C249.8 304.6 256 319.6 256 336s-6.2 31.4-16.3 42.7c-5.9 6.6-16 7.1-22.6 1.3s-7.1-16-1.3-22.6c5.1-5.7 8.1-13.1 8.1-21.3s-3.1-15.7-8.1-21.3c-5.9-6.6-5.3-16.7 1.3-22.6z"/></svg></a>
</li>
<li class="nav-item">
<a class="nav-link" style="color: var(--layout-text-color);" asp-area="" asp-controller="CallCenter"
Expand Down

0 comments on commit 39fe12b

Please sign in to comment.