-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor & optimize property.json (#242)
* 1. prevent changing property.json anywhere 2. every worker start will have a new property.json, strip property.json with non-use graphs 3. except for channel name, token and asr_language, move all other properties settings to frontend * 1. moved properties to frontend 2. frontend can now overwrite property values, while channelName, remoteStreamUid still takes highest priority 3. use process group to better kill worker * fix: remove legacy graph mappings * fix: use native strings.Join * fix: add page description
- Loading branch information
Showing
15 changed files
with
2,698 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,3 @@ xdump_config | |
.vscode | ||
*.pyc | ||
*.pyc.* | ||
/property.json |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { voiceNameMap } from "./constant" | ||
|
||
export const getGraphWithLanguage = (graphName: string, language: string) => { | ||
if (graphName == "camera.va.openai.azure") { | ||
if (language == "zh-CN") { | ||
return `${graphName}.cn` | ||
} | ||
return `${graphName}.en` | ||
} | ||
return graphName | ||
} | ||
|
||
export const getGraphProperties = (graphName: string, language: string, voiceType: string) => { | ||
if (graphName == "camera.va.openai.azure") { | ||
return { | ||
"agora_rtc": { | ||
"agora_asr_language": language, | ||
}, | ||
"openai_chatgpt": { | ||
"model": "gpt-4o" | ||
}, | ||
"azure_tts": { | ||
"azure_synthesis_voice_name": voiceNameMap[language]["azure"][voiceType] | ||
} | ||
} | ||
} else if (graphName == "va.openai.azure") { | ||
return { | ||
"agora_rtc": { | ||
"agora_asr_language": language, | ||
}, | ||
"azure_tts": { | ||
"azure_synthesis_voice_name": voiceNameMap[language]["azure"][voiceType] | ||
} | ||
} | ||
} else if (graphName == "va.qwen.rag") { | ||
return { | ||
"agora_rtc": { | ||
"agora_asr_language": language, | ||
}, | ||
"azure_tts": { | ||
"azure_synthesis_voice_name": voiceNameMap[language]["azure"][voiceType] | ||
} | ||
} | ||
} | ||
return {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.