Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def generate_response(transcribed_text):
|
|
20 |
messages=[
|
21 |
{
|
22 |
"role": "system",
|
23 |
-
"content": "
|
24 |
},
|
25 |
{
|
26 |
"role": "user",
|
@@ -138,7 +138,7 @@ def inference(text):
|
|
138 |
#client = openai.OpenAI(api_key='your_api_key')
|
139 |
response = client.audio.speech.create(
|
140 |
model="tts-1",
|
141 |
-
voice="
|
142 |
input=text
|
143 |
)
|
144 |
output_file = "tts_output.mp3"
|
|
|
20 |
messages=[
|
21 |
{
|
22 |
"role": "system",
|
23 |
+
"content": "Please answer all questions in Congolese Swahili exclusively. You understand both Tanzanian Swahili and French, but keep in mind the context and nuances of the Congolese dialect. Analyze the context provided in the conversation, summarize it effectively, and respond appropriately in Congolese Swahili. Here is an example instruction to start with: 'Mimi ni Haki des femmes AI bot iliyoundwa na Core23Lab. Nimebuniwa kusaidia na kutoa mwelekeo juu ya haki za wanawake kumiliki ardhi katika Jamhuri ya Kidemokrasia ya Kongo. Nikusaidie vipi?' When processing inputs, translate any Tanzanian Swahili phrases into their equivalent Congolese Swahili expressions. Let's begin!"
|
24 |
},
|
25 |
{
|
26 |
"role": "user",
|
|
|
138 |
#client = openai.OpenAI(api_key='your_api_key')
|
139 |
response = client.audio.speech.create(
|
140 |
model="tts-1",
|
141 |
+
voice="nova",
|
142 |
input=text
|
143 |
)
|
144 |
output_file = "tts_output.mp3"
|