Skip to content

Commit

Permalink
TextToVoiceConverter (#132)
Browse files Browse the repository at this point in the history
## Related Issue

#110 

## Email id used to regsiter for VSoc'24


## Description

[Please include a brief description of the changes or features added]

## Type of PR

- [ ] Bug fix
- [ ] Feature enhancement
- [ ] Documentation update
- [ ] Security enhancement
- [ ] Other (specify): _______________


check in issue by entering [X] in boxes

## Screenshots / Videos (if applicable)

[Attach any relevant screenshots or videos demonstrating the changes]

## Checklist
- [ ] I have performed a self-review of my code.
- [ ] I have read and followed the Contribution Guidelines.
- [ ] I have tested the changes thoroughly before submitting this pull
request.
- [ ] I have provided relevant issue numbers, screenshots, and videos
after making the changes.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have followed the code style guidelines of this project.
- [ ] I have checked for any existing open issues that my pull request
may address.
- [ ] I have ensured that my changes do not break any existing
functionality.
- [ ] Each contributor is allowed to create a maximum of 4 issues per
day. This helps us manage and address issues efficiently.
- [ ] I have read the resources for guidance listed below.
- [ ] I have followed security best practices in my code changes.

check in issue by entering [X] in boxes
## Additional Context

[Include any additional information or context that might be helpful for
reviewers.]




## Contribution Guidelines

Thank you for considering contributing to our project! To ensure smooth
collaboration and effective contribution management, please adhere to
the following guidelines:

### Issue Creation

1. **Limit on Issues:**
- Each contributor is allowed to create a maximum of **4 issues per
day**. This helps us manage and address issues efficiently.

### Contribution Levels

2. **Basic Contributions:**
- This project is primarily focused on documentation. Most of the setup
has been completed, so contributors will generally need to work on basic
code tasks, such as writing tests.
   - For these tasks, issues will be assigned the **Easy** label.

3. **Acknowledging Hard Work:**
- If a contributor puts in significant effort on a task, the issue will
be upgraded to **Medium**. This is our way of recognizing and
appreciating extra effort.

4. **Feature Additions and Component Work:**
- Contributors working on new features or components using JSX/TSX will
be assigned a level based on the complexity and quality of their work.
- The more complex and valuable the contribution, the higher the level
assigned.

### Level Definitions

- **Easy:**
- Tasks are straightforward, such as fixing minor bugs, writing tests,
or making simple documentation updates.
- **Medium:**
- Tasks require more effort, such as addressing complex bugs, improving
existing features, or making substantial documentation improvements.
- **Hard:**
- Tasks are highly complex and involve significant new feature
development, major refactoring, or extensive contributions to the
project’s core components.

We look forward to your contributions and appreciate your effort in
helping us improve the project!
  • Loading branch information
dhairyagothi authored Jun 20, 2024
2 parents 9485723 + 2650ad1 commit fe6a1df
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
Binary file added public/TextToVoiceConverter/abc.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions public/TextToVoiceConverter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text to Voice Converter</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Text to Voice Converter</h1>
<textarea id="text-input" placeholder="Enter text here..."></textarea>
<button id="convert-btn">Convert to Speech</button>
<button id="stop-btn" disabled>Stop</button>
</div>
<script src="script.js"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions public/TextToVoiceConverter/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const textInput = document.getElementById('text-input');
const convertBtn = document.getElementById('convert-btn');
const stopBtn = document.getElementById('stop-btn');

let speechSynthesis = window.speechSynthesis;
let speechSynthesisUtterance = new SpeechSynthesisUtterance();

convertBtn.addEventListener('click', () => {
let text = textInput.value.trim();
if (text !== '') {
speechSynthesisUtterance.text = text;
speechSynthesis.speak(speechSynthesisUtterance);
convertBtn.disabled = true;
stopBtn.disabled = false;
}
});

stopBtn.addEventListener('click', () => {
speechSynthesis.cancel();
convertBtn.disabled = false;
stopBtn.disabled = true;
});
52 changes: 52 additions & 0 deletions public/TextToVoiceConverter/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-image: url('abc.jpeg'); /* Add the background image */
background-size: cover; /* Cover the entire viewport */
background-position: center; /* Center the background image */
}

.container {
text-align: center;
padding: 20px;
background-color: rgba(255, 255, 255, 0.8); /* Add a semi-transparent white background */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
max-width: 400px;
width: 100%;
}

h1 {
color: #333;
}

textarea {
width: 100%;
height: 150px;
margin-bottom: 10px;
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.9); /* Adjust background color for better readability */
}

button {
padding: 10px 20px;
font-size: 16px;
margin-top: 10px;
cursor: pointer;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
}

button:disabled {
background-color: #ccc;
cursor: not-allowed;
}
5 changes: 5 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@
<div class="project-name">Ping Pong Game</div>
<a href="ping/index.html" class="demo-link">Demo</a>
</div>
<div class="table">
<div class="day-number">Day 48</div>
<div class="project-name">TextToVoiceConverter</div>
<a href="TextToVoiceConverter/index.html" class="demo-link">Demo</a>
</div>
</div>

<script>
Expand Down

0 comments on commit fe6a1df

Please sign in to comment.