Skip to content

Commit

Permalink
switch fix 2 to english
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Weber committed Dec 13, 2023
1 parent 2ac98f3 commit 76c6505
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1>Text-to-Audio Converter</h1>
</div>
<!-- Error Indicator (Hidden Initially) -->
<div id="error-indicator" style="display: none;">
<p style="color:red;">Es ist ein Fehler bei der Anfrage aufgetreten. <br/> Bist du dir sicher das genug Guthaben verfügbar ist?</p>
<p style="color:red;">An error occured calling the OpenAI API: <br/>Are you sure that the entered key is valid and that there is enough credit balance on your account?</p>
</div>
<!-- Progress Indicator (Hidden Initially) -->
<div id="progress-indicator" style="display: none;">
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function generateAudiobook() {
var segments = splitTextIntoSegments(text, 4000);
var audioBlobs = new Array(segments.length);
var progressBar = document.getElementById('progressbar1');
document.getElementById('error-indicator').style.display = 'none';
progressBar.max = segments.length;
progressBar.value = 0;

Expand Down Expand Up @@ -148,7 +149,6 @@ function callOpenAIAPI(segment, apiKey, callback) {
if (xhr.status === 200) {
var audioBlob = xhr.response;
callback(audioBlob);
document.getElementById('error-indicator').style.display = 'none';
} else {
console.error("Error calling OpenAI API: " + xhr.statusText);
document.getElementById('error-indicator').style.display = 'block';
Expand Down

0 comments on commit 76c6505

Please sign in to comment.