Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions wavefront/client/src/config/voice-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@ export const VOICE_PROVIDERS_CONFIG: VoiceProvidersConfig = {
default: 0.5,
min: 0,
max: 1,
step: 0.05,
step: 0.01,
description: 'Controls voice consistency (0-1)',
},
similarity_boost: {
type: 'number',
default: 0.75,
min: 0,
max: 1,
step: 0.05,
step: 0.01,
description: 'Enhances voice similarity (0-1)',
},
style: {
type: 'number',
default: 0.0,
min: 0,
max: 1,
step: 0.05,
step: 0.01,
description: 'Style exaggeration (0-1)',
},
use_speaker_boost: {
Expand All @@ -99,7 +99,7 @@ export const VOICE_PROVIDERS_CONFIG: VoiceProvidersConfig = {
default: 1.0,
min: 0.25,
max: 4.0,
step: 0.05,
step: 0.01,
description: 'Speech speed (0.25-4.0)',
},
},
Expand Down Expand Up @@ -155,7 +155,7 @@ export const VOICE_PROVIDERS_CONFIG: VoiceProvidersConfig = {
default: undefined,
description: 'Speech speed multiplier',
placeholder: '1.0',
step: 0.1,
step: 0.01,
},
},
},
Expand Down Expand Up @@ -183,23 +183,23 @@ export const VOICE_PROVIDERS_CONFIG: VoiceProvidersConfig = {
default: 0.0,
min: -0.75,
max: 0.75,
step: 0.05,
step: 0.01,
description: 'Voice pitch (-0.75 to 0.75)',
},
pace: {
type: 'number',
default: 1.0,
min: 0.3,
max: 3.0,
step: 0.1,
step: 0.01,
description: 'Speech pace (0.3-3.0)',
},
loudness: {
type: 'number',
default: 1.0,
min: 0.1,
max: 3.0,
step: 0.1,
step: 0.01,
description: 'Volume (0.1-3.0)',
},
enable_preprocessing: {
Expand All @@ -212,7 +212,7 @@ export const VOICE_PROVIDERS_CONFIG: VoiceProvidersConfig = {
default: 0.6,
min: 0.01,
max: 1.0,
step: 0.05,
step: 0.01,
description: 'Randomness for bulbul v3 (0.01-1.0)',
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FILLER_PHRASES = {
'en': [
'Please wait a moment',
'Just a second',
'Give me a moment',
'One moment please',
],
'hi': ['कृपया एक पल प्रतीक्षा करें', 'बस एक सेकंड', 'मुझे एक पल दें', 'एक पल रुकिए'],
'ta': [
'தயவுசெய்து ஒரு நிமிடம் காத்திருக்கவும்',
'ஒரு நொடி',
'எனக்கு ஒரு நிமிடம் கொடுங்கள்',
'ஒரு நிமிடம்',
],
'te': [
'దయచేసి ఒక్క క్షణం వేచి ఉండండి',
'ఒక్క నిమిషం',
'నాకు ఒక్క క్షణం ఇవ్వండి',
'ఒక్క క్షణం దయచేసి',
],
'ml': [
'ദയവായി ഒരു നിമിഷം കാത്തിരിക്കൂ',
'ഒരു സെക്കൻഡ്',
'എനിക്ക് ഒരു നിമിഷം തരൂ',
'ഒരു നിമിഷം ദയവായി',
],
'kn': [
'ದಯವಿಟ್ಟು ಒಂದು ಕ್ಷಣ ಕಾಯಿರಿ',
'ಒಂದು ಕ್ಷಣ',
'ನನಗೆ ಒಂದು ಕ್ಷಣ ನೀಡಿ',
'ಒಂದು ಕ್ಷಣ ದಯವಿಟ್ಟು',
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from typing import Dict, Any, List
from copy import deepcopy
import os
import random
from call_processing.log.logger import logger
from call_processing.services.tool_wrapper_service import ToolWrapperFactory
from call_processing.utils import get_current_ist_time_str
Expand Down Expand Up @@ -57,6 +59,7 @@
from call_processing.constants.language_config import (
LANGUAGE_INSTRUCTIONS,
)
from call_processing.constants.filler_phrases import FILLER_PHRASES


class STTLanguageSwitcher(ParallelPipeline):
Expand Down Expand Up @@ -519,6 +522,25 @@ async def run_conversation(
task_container['task'] = task

# Register event handlers
@llm.event_handler('on_function_calls_started')
async def on_function_calls_started(service, function_calls):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Resolve unused callback parameters to keep lint clean.

Line 525 introduces service and function_calls but does not use them (Ruff ARG001).

Suggested fix
-        async def on_function_calls_started(service, function_calls):
+        async def on_function_calls_started(_service, _function_calls):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async def on_function_calls_started(service, function_calls):
async def on_function_calls_started(_service, _function_calls):
🧰 Tools
🪛 Ruff (0.15.2)

[warning] 525-525: Unused function argument: service

(ARG001)


[warning] 525-525: Unused function argument: function_calls

(ARG001)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py`
at line 525, The on_function_calls_started callback defines unused parameters
`service` and `function_calls` causing ARG001; fix it by renaming the parameters
to indicate intentional unused (e.g., `_service` and `_function_calls`) or
prefixing them with underscores so the linter ignores them while keeping the
function signature (update the async def on_function_calls_started definition
accordingly).

if (
os.getenv('ENABLE_FILLER_PHRASES_BEFORE_TOOL_CALL', '').lower()
!= 'true'
):
return
# Skip filler phrase when language is switching — the TTS service's language
# may change before the queued frame is processed, causing a language mismatch error.
call_names = [fc.function_name for fc in function_calls]
if 'detect_and_switch_language' in call_names:
return
current_lang = language_state.get('current_language', 'en')
phrases = FILLER_PHRASES.get(current_lang)
if not phrases:
return
phrase = random.choice(phrases)
await task.queue_frame(TTSSpeakFrame(phrase))

@transport.event_handler('on_client_connected')
async def on_client_connected(transport, client):
logger.info(f"Client connected for agent: {agent_config['name']}")
Expand Down
Loading