Skip to content
Merged
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ rosdep install --from-paths src --ignore-src -r -y
> poetry install --with openset,nomad
> ```

#### 1.4 Configure RAI

Run the configuration tool to set up your vendor and other settings:

```bash
poetry shell
streamlit run src/rai/rai/utils/configurator.py
```

> [!TIP]
> If the web browser does not open automatically, open the URL displayed in the terminal manually.

### 2. Build the project:

#### 2.1 Build RAI workspace
Expand Down
20 changes: 17 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[vendor]
simple_model = "openai" # openai, aws, ollama
embeddings_model = "ollama"
simple_model = "openai"
complex_model = "openai"
embeddings_model = "openai"

[aws]
simple_model = "anthropic.claude-3-haiku-20240307-v1:0"
Expand All @@ -25,7 +25,21 @@ project = "rai"

[tracing.langfuse]
use_langfuse = false
host = "https://cloud.langfuse.com"
host = "http://localhost:3000"

[tracing.langsmith]
use_langsmith = false

[asr]
recording_device_name = "default"
vendor = "whisper"
language = "en"
silence_grace_period = 0.3
use_wake_word = false
vad_threshold = 0.3
wake_word_model = ""
wake_word_threshold = 0.5
Comment on lines +33 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

🛠️ Refactor suggestion

Parameter validation for ASR configuration is missing

  • vad_threshold and wake_word_threshold are not validated to be between 0 and 1.
  • silence_grace_period is not validated to be positive.
  • recording_device_name is not verified against available devices.
🔗 Analysis chain

Add parameter validation for ASR configuration

The ASR configuration includes several parameters that should be validated:

  1. vad_threshold and wake_word_threshold should be between 0 and 1
  2. silence_grace_period should be positive
  3. recording_device_name should be verified against available devices
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for parameter validation in ASR configuration loading

# Search for ASR config validation
echo "Checking for ASR config validation..."
ast-grep --pattern 'def $_(config: $_) {
  $$$
  asr$_
  $$$
}'

# Search for device name validation
echo "Checking for recording device validation..."
rg -l "recording_device.*validation|check.*recording.*device"

Length of output: 346


[tts]
vendor = "elevenlabs"
keep_speaker_busy = false
Comment on lines +43 to +45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing API Key Configuration for ElevenLabs in TTS

The TTS configuration lacks API key setup for ElevenLabs integration:

  • API key configuration not found in src/rai/rai/utils/configurator.py
🔗 Analysis chain

Consider additional TTS configuration parameters

The TTS configuration appears minimal and might be missing important parameters:

  1. API key configuration for ElevenLabs
  2. Voice selection options
  3. Speech parameters (speed, pitch, etc.)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for TTS vendor integration and configuration handling

# Search for ElevenLabs integration
echo "Checking for ElevenLabs integration..."
rg -l "elevenlabs.*api|elevenlabs.*key"

# Search for TTS configuration handling
echo "Checking for TTS configuration handling..."
ast-grep --pattern 'class $TTS {
  $$$
  def $_($_, config: $_) {
    $$$
  }
  $$$
}'

Length of output: 346

18 changes: 17 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ deprecated = "^1.2.14"
tomli = "^2.0.1"
openwakeword = { git = "https://github.com/maciejmajek/openWakeWord.git", branch = "chore/remove-tflite-backend" }
pytest-timeout = "^2.3.1"
tomli-w = "^1.1.0"
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.4"

Expand Down
Loading