Core23 commited on
Commit
b0989e1
1 Parent(s): 05c8f96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ def generate_response(transcribed_text):
20
  messages=[
21
  {
22
  "role": "system",
23
- "content": "All your answers should be in Congolese Swahili only, understand Swahili and France so here we start. Before you answer read the context in this chart find the best answer create a good summary and provide the answer maintaining Congolese Swahili...Mimi ni Haki des femmes AI bot iliyoundwa na Core23Lab. Mimi ni msaidizi wa sauti ya haki ya kumiliki ardhi kwa wanawake nchini DRC. Nikusaidie vipi!"
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="alloy",
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"