Skip to content

Commit 86f0f6a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 935c07c + ab7b12a commit 86f0f6a

File tree

4 files changed

+104
-11
lines changed

4 files changed

+104
-11
lines changed

.github/workflows/rust.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build
20+
run: cargo build --verbose
21+
- name: Run tests
22+
run: cargo test --verbose

.idea/speech-translator-rs.iml

-11
This file was deleted.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 robert.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# speech-translator-rs
2+
3+
speech-translator-rs is a Rust-based application that records audio, transcribes it to text, and translates the transcribed text into a specified target language using Groq's API.
4+
5+
## Features
6+
7+
- Record audio and save it as a WAV file
8+
- Transcribe audio to text using the Groq API
9+
- Translate transcribed text to a target language using the Groq API
10+
- Environment variable support for API tokens
11+
12+
## Requirements
13+
14+
- Rust and Cargo installed
15+
- An API token for the Groq API
16+
17+
## Installation
18+
19+
1. Clone the repository:
20+
```sh
21+
git clone https://github.com/90th/speech-translator-rs.git
22+
cd speech-translator-rs
23+
```
24+
25+
2. Install dependencies:
26+
```sh
27+
cargo build
28+
```
29+
30+
3. Set up environment variables:
31+
```sh
32+
cp .env.example .env
33+
# Edit .env to include your API token
34+
```
35+
36+
## Usage
37+
38+
1. Run the application:
39+
```sh
40+
cargo run
41+
```
42+
43+
2. Follow the prompts to start and stop recording audio.
44+
45+
## Configuration
46+
47+
- Edit the `.env` file to include your Groq API token:
48+
```env
49+
API_TOKEN=your_api_token_here
50+
```
51+
52+
## License
53+
54+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
55+
56+
## Acknowledgements
57+
58+
- [CPAL](https://github.com/RustAudio/cpal) for audio input
59+
- [Hound](https://github.com/ruuda/hound) for WAV file handling
60+
- [Reqwest](https://github.com/seanmonstar/reqwest) for HTTP requests
61+
- [dotenv](https://github.com/dotenv-rs/dotenv) for environment variable support

0 commit comments

Comments
 (0)