File size: 1,150 Bytes
5804b04
 
9366332
 
 
5804b04
9366332
5804b04
 
9366332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: Japanese AI Interview API
emoji: 🎤
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
---

# Japanese AI Interview API

Role-based, voice-first Japanese interview practice for working visa jobs.

## This build uses
- Hugging Face Inference ASR for speech-to-text
- Hugging Face router chat completions for dynamic next-question logic
- A built-in 654-question bank across 6 job roles
- N4-level interviewer style
- Early fail after repeated no-sound or weak answers
- Up to 20 questions when the interview is going well

## Endpoints
- `GET /`
- `GET /health`
- `GET /roles`
- `POST /start`
- `POST /answer`

## Space secrets / variables

### Secret
- `HF_TOKEN` = Hugging Face token with Inference Providers permission

### Variables
- `ASR_MODEL` = `openai/whisper-large-v3`
- `CHAT_MODEL` = `Qwen/Qwen2.5-7B-Instruct-1M`
- `MAX_QUESTION_LIMIT` = `20`

## Start payload example

```json
{
  "session_uuid": "session-123",
  "job_role": "construction",
  "question_count": 12
}
```

## Available job_role values
- `construction`
- `restaurant_konbini`
- `nursing_care`
- `hotel_accommodation`
- `agriculture`
- `manufacturing`